--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock
Please unblock libwacom 0.6. It fixes crashes in gnome-settings-daemon
related to a number of tablets (assertions failed because the data is
incorrect).
libwacom (0.6-1) unstable; urgency=low
* New upstream release.
- fixes crashers when the stylus definition is missing from the database
* Drop all patches, found upstream.
unblock libwacom/0.6-1
Thanks,
--
.''`. Josselin Mouette
: :' :
`. `'
`-
diff -Nru libwacom-0.5/config.guess libwacom-0.6/config.guess
diff -Nru libwacom-0.5/config.sub libwacom-0.6/config.sub
diff -Nru libwacom-0.5/configure libwacom-0.6/configure
diff -Nru libwacom-0.5/configure.ac libwacom-0.6/configure.ac
--- libwacom-0.5/configure.ac 2012-05-01 05:07:35.000000000 +0200
+++ libwacom-0.6/configure.ac 2012-06-26 03:52:00.000000000 +0200
@@ -1,6 +1,6 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libwacom], [0.5])
+AC_INIT([libwacom], [0.6])
AC_CONFIG_HEADERS([config.h])
# Initialize Automake
@@ -17,7 +17,7 @@
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
-LIBWACOM_LT_VERSION=2:0:0
+LIBWACOM_LT_VERSION=3:0:1
AC_SUBST(LIBWACOM_LT_VERSION)
# Initialize libtool
diff -Nru libwacom-0.5/data/bamboo-2fg-4x5.tablet libwacom-0.6/data/bamboo-2fg-4x5.tablet
--- libwacom-0.5/data/bamboo-2fg-4x5.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/bamboo-2fg-4x5.tablet 2012-06-04 02:02:39.000000000 +0200
@@ -0,0 +1,23 @@
+# Wacom
+# Bamboo Pen & Touch
+# CTH-460
+#
+# first generation BambooPT
+#
+# stylus with two buttons and eraser; 2FG touch
+# Pen active area: 5.8 x 3.62in
+# Touch active area: 4.92 x 3.35in
+
+[Device]
+Name=Wacom Bamboo 2FG 4x5
+DeviceMatch=usb:056a:00d1
+Class=Bamboo
+Width=6
+Height=4
+
+[Features]
+Stylus=true
+Reversible=true
+Touch=true
+Buttons=4
+BuiltIn=false
diff -Nru libwacom-0.5/data/bamboo-2fg-6x8.tablet libwacom-0.6/data/bamboo-2fg-6x8.tablet
--- libwacom-0.5/data/bamboo-2fg-6x8.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/bamboo-2fg-6x8.tablet 2012-06-04 02:02:39.000000000 +0200
@@ -0,0 +1,23 @@
+# Wacom
+# Bamboo Fun
+# CTH-661
+#
+# first generation BambooPT
+#
+# stylus with two buttons and eraser; 2FG touch
+# Pen active area: 8.53 x 5.40 in
+# Touch active area: 7.48 x 5.12 in
+
+[Device]
+Name=Wacom Bamboo 2FG 6x8
+DeviceMatch=usb:056a:00d3
+Class=Bamboo
+Width=9
+Height=5
+
+[Features]
+Stylus=true
+Reversible=true
+Touch=true
+Buttons=4
+BuiltIn=false
diff -Nru libwacom-0.5/data/bamboo-2fg.tablet libwacom-0.6/data/bamboo-2fg.tablet
--- libwacom-0.5/data/bamboo-2fg.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/bamboo-2fg.tablet 2012-06-04 02:02:39.000000000 +0200
@@ -0,0 +1,22 @@
+# Wacom
+# Bamboo Touch
+# CTT-460
+#
+# first generation BambooPT
+#
+# no stylus; 2FG touch
+# Touch active area: 4.92 x 3.35in
+
+[Device]
+Name=Wacom Bamboo 2FG
+DeviceMatch=usb:056a:00d0
+Class=Bamboo
+Width=5
+Height=3
+
+[Features]
+Stylus=false
+Reversible=true
+Touch=true
+Buttons=4
+BuiltIn=false
diff -Nru libwacom-0.5/data/bamboo-craft.tablet libwacom-0.6/data/bamboo-craft.tablet
--- libwacom-0.5/data/bamboo-craft.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/bamboo-craft.tablet 2012-06-04 02:02:39.000000000 +0200
@@ -0,0 +1,23 @@
+# Wacom
+# Bamboo Craft
+# CTH-461
+#
+# first generation BambooPT
+#
+# stylus with two buttons and eraser; 2FG touch
+# Pen active area: 5.8 x 3.62in
+# Touch active area: 4.92 x 3.35in
+
+[Device]
+Name=Wacom Bamboo Craft
+DeviceMatch=usb:056a:00d2
+Class=Bamboo
+Width=6
+Height=4
+
+[Features]
+Stylus=true
+Reversible=true
+Touch=true
+Buttons=4
+BuiltIn=false
diff -Nru libwacom-0.5/data/bamboo-pen-and-touch.tablet libwacom-0.6/data/bamboo-pen-and-touch.tablet
--- libwacom-0.5/data/bamboo-pen-and-touch.tablet 2012-05-01 05:02:19.000000000 +0200
+++ libwacom-0.6/data/bamboo-pen-and-touch.tablet 1970-01-01 01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-[Device]
-# Bamboo Pen & Touch (CTH-460-DE), 2nd generation bamboo
-Name=Wacom Bamboo Pen & Touch
-
-DeviceMatch=usb:056a:00d1
-
-Class=Bamboo
-
-# There are two widths and heigths, one for pen input, one for touch.
-# The one for pen is bigger, but in linux, only the smaller one works.
-# But as the width is advertised as the bigger one for pen input, I put the pen input here.
-Width=6
-Height=4
-
-# The other stylusses don't match it, it has two buttons and an eraser.
-Styli=0xfffff
-
-[Features]
-Stylus=true
-
-Reversible=true
-
-Touch=true
-
-Ring=false
-Ring2=false
-
-Buttons=4
-
-BuiltIn=false
-
diff -Nru libwacom-0.5/data/bamboo-pen.tablet libwacom-0.6/data/bamboo-pen.tablet
--- libwacom-0.5/data/bamboo-pen.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/bamboo-pen.tablet 2012-05-29 06:42:14.000000000 +0200
@@ -0,0 +1,22 @@
+# Wacom
+# Bamboo Pen
+# CTL-460
+#
+# first generation BambooPT
+#
+# stylus with two buttons and no eraser
+# Pen active area: 5.8 x 3.62in
+
+[Device]
+Name=Wacom Bamboo Pen
+DeviceMatch=usb:056a:00d4
+Class=Bamboo
+Width=6
+Height=4
+
+[Features]
+Stylus=true
+Reversible=true
+Touch=false
+Buttons=0
+BuiltIn=false
diff -Nru libwacom-0.5/data/cintiq-21ux2.tablet libwacom-0.6/data/cintiq-21ux2.tablet
--- libwacom-0.5/data/cintiq-21ux2.tablet 2012-04-16 05:58:37.000000000 +0200
+++ libwacom-0.6/data/cintiq-21ux2.tablet 2012-05-29 06:40:51.000000000 +0200
@@ -1,5 +1,5 @@
# Wacom
-# Cintiq 21UX
+# Cintiq 21UX2
# DTK-2100
#
# Button Map:
diff -Nru libwacom-0.5/data/dti-520.tablet libwacom-0.6/data/dti-520.tablet
--- libwacom-0.5/data/dti-520.tablet 2012-05-01 05:01:56.000000000 +0200
+++ libwacom-0.6/data/dti-520.tablet 2012-06-04 01:59:08.000000000 +0200
@@ -20,7 +20,8 @@
Class=PenDisplay
Width=14
Height=12
-Styli=0xfffff;
+# FIXME does the stylus have an eraser?
+# Styli=0xfffff;
[Features]
# This tablet does not appear to support erasers on styli
diff -Nru libwacom-0.5/data/isdv4-90.tablet libwacom-0.6/data/isdv4-90.tablet
--- libwacom-0.5/data/isdv4-90.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/isdv4-90.tablet 2012-05-29 06:42:15.000000000 +0200
@@ -0,0 +1,18 @@
+# USB tablet PC models: ASUS R1E and ASUS R1F
+#
+# stylus with one button and eraser
+#
+# Screen size 11.7 x 7.9; 13.3" diagonal
+
+[Device]
+Name=Wacom ISDv4 90
+DeviceMatch=usb:056a:0090;serial:056a:0090
+Class=ISDV4
+Width=12
+Height=8
+
+[Features]
+Stylus=true
+Touch=false
+Buttons=0
+BuiltIn=true
diff -Nru libwacom-0.5/data/isdv4-93.tablet libwacom-0.6/data/isdv4-93.tablet
--- libwacom-0.5/data/isdv4-93.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/isdv4-93.tablet 2012-05-29 06:42:16.000000000 +0200
@@ -0,0 +1,18 @@
+# USB tablet PC models: HP Pavilion TX2000 and HP Pavilion TX2500
+#
+# stylus with two buttons and eraser; 1FGT touchscreen
+#
+# Screen size 10.2 x 6.4; 12.1" diagonal
+
+[Device]
+Name=Wacom ISDv4 93
+DeviceMatch=usb:056a:0093;serial:056a:0093
+Class=ISDV4
+Width=10
+Height=6
+
+[Features]
+Stylus=true
+Touch=true
+Buttons=0
+BuiltIn=true
diff -Nru libwacom-0.5/data/isdv4-ed.tablet libwacom-0.6/data/isdv4-ed.tablet
--- libwacom-0.5/data/isdv4-ed.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/isdv4-ed.tablet 2012-05-29 06:40:47.000000000 +0200
@@ -0,0 +1,12 @@
+# this is for the Wacom pen + touchscreen as found in the Panasonic CF-H2 laptop.
+
+[Device]
+Name=Wacom ISDv4 ED
+DeviceMatch=usb:056a:00ed
+Class=ISDV4
+
+[Features]
+Stylus=true
+Touch=true
+BuiltIn=true
+Buttons=0
diff -Nru libwacom-0.5/data/isdv4-ef.tablet libwacom-0.6/data/isdv4-ef.tablet
--- libwacom-0.5/data/isdv4-ef.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/isdv4-ef.tablet 2012-05-29 06:40:46.000000000 +0200
@@ -0,0 +1,11 @@
+# this is for the Wacom pen as found in a limited special Tablet PC edition
+
+[Device]
+Name=Wacom ISDv4 EF
+DeviceMatch=usb:056a:00ef
+Class=ISDV4
+
+[Features]
+Stylus=true
+BuiltIn=true
+Buttons=0
diff -Nru libwacom-0.5/data/libwacom.stylus libwacom-0.6/data/libwacom.stylus
--- libwacom-0.5/data/libwacom.stylus 2012-04-16 05:58:37.000000000 +0200
+++ libwacom-0.6/data/libwacom.stylus 2012-06-04 02:02:39.000000000 +0200
@@ -19,13 +19,15 @@
Type=Inking
[0x801]
-Name=Intuos3 Inking Pen
+# Intuos3 and Cintiq 21UX
+Name=Inking Pen
Buttons=0
HasEraser=false
Type=Inking
[0x20802]
-Name=Intuos4 Inking Pen
+# Intuos4, 5 and Cintiq 21UX2, 24HD
+Name=Inking Pen
Buttons=0
HasEraser=false
Type=Inking
@@ -45,49 +47,57 @@
Type=Classic
[0x842]
-Name=Intuos2 Designer Pen
+# Intuos2
+Name=Designer Pen
HasEraser=false
Buttons=2
Type=General
[0x852]
-Name=Intuos2 Grip Pen
+# Intuos2
+Name=Grip Pen
HasEraser=true
Buttons=2
Type=General
[0x823]
-Name=Intuos3 Grip Pen
+# Intuos3 and Cintiq 21UX
+Name=Grip Pen
HasEraser=true
Buttons=2
Type=General
[0x813]
-Name=Intuos3 Classic Pen
+# Intuos3 and Cintiq 21UX
+Name=Classic Pen
HasEraser=true
Buttons=2
Type=Classic
[0x885]
-Name=Intuos3 6D Art Pen
+# Intuos3 and Cintiq 21UX
+Name=6D Art Pen
HasEraser=false
Buttons=0
Type=Marker
[0x802]
-Name=Intuos4 Grip Pen
+# Intuos4, 5 and Cintiq 21UX2, 24HD
+Name=Grip Pen
HasEraser=true
Buttons=2
Type=General
[0x804]
-Name=Intuos4 Art Pen
+# Intuos4, 5 and Cintiq 21UX2, 24HD
+Name=Art Pen
HasEraser=true
Buttons=2
Type=Marker
[0x40802]
-Name=Intuos4 Classic Pen
+# Intuos4, 5 and Cintiq 21UX2, 24HD
+Name=Classic Pen
HasEraser=true
Buttons=2
Type=Classic
@@ -114,67 +124,83 @@
# Intuos and Intuos2
Name=Classic Pen Eraser
IsEraser=true
+Type=Classic
[0x85a]
-Name=Intuos2 Grip Pen Eraser
+# Intuos2
+Name=Grip Pen Eraser
IsEraser=true
+Type=General
[0x91a]
-Name=Intuos2 Airbrush Pen Eraser
+# Intuos2
+Name=Airbrush Pen Eraser
IsEraser=true
+Type=Airbrush
[0xd1a]
-Name=Intuos Airbrush Pen Eraser
+# Intuos
+Name=Airbrush Pen Eraser
IsEraser=true
+Type=Airbrush
[0x0fa]
Name=Eraser
IsEraser=true
[0x82b]
-Name=Intuos3 Grip Pen Eraser
+# Intuos3 and Cintiq 21UX
+Name=Grip Pen Eraser
IsEraser=true
Type=General
[0x81b]
-Name=Intuos3 Classic Pen Eraser
+# Intuos3 and Cintiq 21UX
+Name=Classic Pen Eraser
IsEraser=true
Type=Classic
[0x91b]
-Name=Intuos3 Airbrush Pen Eraser
+# Intuos3 and Cintiq 21UX
+Name=Airbrush Pen Eraser
IsEraser=true
Type=Airbrush
[0x80c]
-Name=Intuos4 Art Pen Eraser
+# Intuos4, 5 and Cintiq 21UX2, 24HD
+Name=Art Pen Eraser
IsEraser=true
Type=Marker
[0x80a]
-Name=Intuos4 Grip Pen Eraser
+# Intuos4, 5 and Cintiq 21UX2, 24HD
+Name=Grip Pen Eraser
IsEraser=true
Type=General
[0x4080a]
-Name=Intuos4 Classic Pen Eraser
+# Intuos4, 5 and Cintiq 21UX2, 24HD
+Name=Classic Pen Eraser
IsEraser=true
Type=Classic
[0x90a]
-Name=Intuos4 Airbrush Pen Eraser
+# Intuos4, 5 and Cintiq 21UX2, 24HD
+Name=Airbrush Pen Eraser
IsEraser=true
Type=Airbrush
# Airbrush pen has eraser
[0xd12]
-Name=Intuos Airbrush Pen
+# Intuos
+Name=Airbrush Pen
HasEraser=true
Buttons=1
Type=Airbrush
[0x912]
-Name=Intuos2 Airbrush Pen
+# Intuos2
+Name=Airbrush Pen
HasEraser=true
Buttons=1
Type=Airbrush
@@ -185,13 +211,15 @@
Type=Airbrush
[0x913]
-Name=Intuos3 Airbrush Pen
+# Intuos3 and Cintiq 21UX
+Name=Airbrush Pen
Buttons=1
HasEraser=true
Type=Airbrush
[0x902]
-Name=Intuos4 Airbrush Pen
+# Intuos4, 5 and Cintiq 21UX2, 24HD
+Name=Airbrush Pen
Buttons=1
HasEraser=true
Type=Airbrush
@@ -205,13 +233,15 @@
Buttons=5
[0x097]
-Name=Intuos3 Lens Cursor
+# Intuos3
+Name=Lens Cursor
Type=Puck
HasLens=True
Buttons=5
[0x006]
-Name=Intuos4 Lens Cursor
+# Intuos4 and Intuos5
+Name=Lens Cursor
Type=Puck
HasLens=True
Buttons=5
@@ -224,19 +254,22 @@
Buttons=5
[0x007]
-Name=Intuos2 2D Mouse
+# Intuos3
+Name=2D Mouse
Type=Puck
HasLens=False
Buttons=3
[0x017]
-Name=Intuos3 Mouse
+# Intuos3
+Name=Mouse
Type=Puck
HasLens=False
Buttons=5
[0x806]
-Name=Intuos4 Five Button Mouse
+# Intuos4 and Intuos5
+Name=Five Button Mouse
Type=Puck
HasLens=False
Buttons=5
diff -Nru libwacom-0.5/data/n-trig-pen.tablet libwacom-0.6/data/n-trig-pen.tablet
--- libwacom-0.5/data/n-trig-pen.tablet 1970-01-01 01:00:00.000000000 +0100
+++ libwacom-0.6/data/n-trig-pen.tablet 2012-05-29 06:42:17.000000000 +0200
@@ -0,0 +1,19 @@
+# USB tablet PC models: HP TouchSmart TX2z, Dell Latitude XT, and Dell Latitude XT2
+#
+# stylus with two buttons and no eraser; 4FGT touchscreen
+#
+# HP Screen size 10.2 x 6.4; 12.1" diagonal
+# Dell Screen size 10.3 x 6.4; 12.1" diagonal
+
+[Device]
+Name=N-Trig Pen
+DeviceMatch=usb:1b96:0001
+Class=ISDV4
+Width=10
+Height=6
+
+[Features]
+Stylus=true
+Touch=true
+Buttons=0
+BuiltIn=true
diff -Nru libwacom-0.5/debian/changelog libwacom-0.6/debian/changelog
--- libwacom-0.5/debian/changelog 2012-05-31 23:13:35.000000000 +0200
+++ libwacom-0.6/debian/changelog 2012-09-29 13:11:27.000000000 +0200
@@ -1,3 +1,11 @@
+libwacom (0.6-1) unstable; urgency=low
+
+ * New upstream release.
+ - fixes crashers when the stylus definition is missing from the database
+ * Drop all patches, found upstream.
+
+ -- Timo Aaltonen <tjaal...@ubuntu.com> Sat, 29 Sep 2012 14:08:57 +0300
+
libwacom (0.5-1) unstable; urgency=low
* New upstream release.
diff -Nru libwacom-0.5/debian/patches/fix-an-error-message.patch libwacom-0.6/debian/patches/fix-an-error-message.patch
diff -Nru libwacom-0.5/debian/patches/fix-null-assert.patch libwacom-0.6/debian/patches/fix-null-assert.patch
diff -Nru libwacom-0.5/debian/patches/git-add-generic-eraser-to-bamboo.patch libwacom-0.6/debian/patches/git-add-generic-eraser-to-bamboo.patch
diff -Nru libwacom-0.5/debian/patches/git-fix-generic-stylus-missing-an-eraser.patch libwacom-0.6/debian/patches/git-fix-generic-stylus-missing-an-eraser.patch
diff -Nru libwacom-0.5/debian/patches/series libwacom-0.6/debian/patches/series
--- libwacom-0.5/debian/patches/series 2012-05-11 04:03:11.000000000 +0200
+++ libwacom-0.6/debian/patches/series 2012-09-18 13:28:06.000000000 +0200
@@ -1,4 +1 @@
-git-fix-generic-stylus-missing-an-eraser.patch
-git-add-generic-eraser-to-bamboo.patch
-fix-an-error-message.patch
-fix-null-assert.patch
+#placeholder
diff -Nru libwacom-0.5/depcomp libwacom-0.6/depcomp
diff -Nru libwacom-0.5/doc/html/files.html libwacom-0.6/doc/html/files.html
diff -Nru libwacom-0.5/doc/html/globals_defs.html libwacom-0.6/doc/html/globals_defs.html
diff -Nru libwacom-0.5/doc/html/globals_enum.html libwacom-0.6/doc/html/globals_enum.html
diff -Nru libwacom-0.5/doc/html/globals_eval.html libwacom-0.6/doc/html/globals_eval.html
diff -Nru libwacom-0.5/doc/html/globals_func.html libwacom-0.6/doc/html/globals_func.html
diff -Nru libwacom-0.5/doc/html/globals.html libwacom-0.6/doc/html/globals.html
diff -Nru libwacom-0.5/doc/html/globals_type.html libwacom-0.6/doc/html/globals_type.html
diff -Nru libwacom-0.5/doc/html/index.html libwacom-0.6/doc/html/index.html
diff -Nru libwacom-0.5/doc/html/libwacom_8h.html libwacom-0.6/doc/html/libwacom_8h.html
diff -Nru libwacom-0.5/doc/html/libwacom_8h_source.html libwacom-0.6/doc/html/libwacom_8h_source.html
diff -Nru libwacom-0.5/install-sh libwacom-0.6/install-sh
diff -Nru libwacom-0.5/libwacom/libwacom.c libwacom-0.6/libwacom/libwacom.c
--- libwacom-0.5/libwacom/libwacom.c 2012-05-01 05:01:56.000000000 +0200
+++ libwacom-0.6/libwacom/libwacom.c 2012-06-25 02:15:28.000000000 +0200
@@ -47,6 +47,34 @@
g_udev_device_get_property_as_boolean (device, "ID_INPUT_TOUCHPAD");
}
+/* Overriding SUBSYSTEM isn't allowed in udev (works sometimes, but not
+ * always). For evemu devices we need to set custom properties to make them
+ * detected by libwacom.
+ */
+static char *
+get_uinput_subsystem (GUdevDevice *device)
+{
+ const char *bus_str;
+ GUdevDevice *parent;
+
+
+ bus_str = NULL;
+ parent = g_object_ref (device);
+
+ while (parent && !g_udev_device_get_property_as_boolean (parent, "UINPUT_DEVICE")) {
+ GUdevDevice *old_parent = parent;
+ parent = g_udev_device_get_parent (old_parent);
+ g_object_unref (old_parent);
+ }
+
+ if (parent) {
+ bus_str = g_udev_device_get_property (parent, "UINPUT_SUBSYSTEM");
+ g_object_unref (parent);
+ }
+
+ return bus_str ? g_strdup (bus_str) : NULL;
+}
+
static char *
get_bus (GUdevDevice *device)
{
@@ -54,23 +82,30 @@
char *bus_str;
GUdevDevice *parent;
+ bus_str = get_uinput_subsystem (device);
+ if (bus_str)
+ return bus_str;
+
subsystem = g_udev_device_get_subsystem (device);
parent = g_object_ref (device);
while (parent && g_strcmp0 (subsystem, "input") == 0) {
GUdevDevice *old_parent = parent;
parent = g_udev_device_get_parent (old_parent);
- subsystem = g_udev_device_get_subsystem (parent);
+ if (parent)
+ subsystem = g_udev_device_get_subsystem (parent);
g_object_unref (old_parent);
}
- if (g_strcmp0 (subsystem, "tty") == 0 || g_strcmp0 (subsystem, "serio") == 0)
- bus_str = g_strdup ("serial");
- else
- bus_str = g_strdup (subsystem);
+ if (parent) {
+ if (g_strcmp0 (subsystem, "tty") == 0 || g_strcmp0 (subsystem, "serio") == 0)
+ bus_str = g_strdup ("serial");
+ else
+ bus_str = g_strdup (subsystem);
- if (parent)
g_object_unref (parent);
+ } else
+ bus_str = strdup("unknown");
return bus_str;
}
@@ -150,12 +185,27 @@
*bus = bus_from_str (bus_str);
if (*bus == WBUSTYPE_USB) {
const char *vendor_str, *product_str;
+ GUdevDevice *parent;
vendor_str = g_udev_device_get_property (device, "ID_VENDOR_ID");
product_str = g_udev_device_get_property (device, "ID_MODEL_ID");
+ parent = NULL;
+ /* uinput devices have the props set on the parent, there is
+ * nothing a a udev rule can match on on the child */
+ if (!vendor_str || !product_str) {
+ parent = g_udev_device_get_parent (device);
+ if (parent) {
+ vendor_str = g_udev_device_get_property (parent, "ID_VENDOR_ID");
+ product_str = g_udev_device_get_property (parent, "ID_MODEL_ID");
+ }
+ }
+
*vendor_id = strtol (vendor_str, NULL, 16);
*product_id = strtol (product_str, NULL, 16);
+
+ if (parent)
+ g_object_unref (parent);
} else if (*bus == WBUSTYPE_BLUETOOTH || *bus == WBUSTYPE_SERIAL) {
GUdevDevice *parent;
const char *product_str;
@@ -177,11 +227,17 @@
g_object_unref (old_parent);
}
- g_assert (product_str);
- if (sscanf(product_str, "%d/%x/%x/%d", &garbage, vendor_id, product_id, &garbage) != 4) {
- libwacom_error_set(error, WERROR_UNKNOWN_MODEL, "Unimplemented serial bus");
- g_object_unref(parent);
- goto bail;
+ if (product_str) {
+ if (sscanf(product_str, "%d/%x/%x/%d", &garbage, vendor_id, product_id, &garbage) != 4) {
+ libwacom_error_set(error, WERROR_UNKNOWN_MODEL, "Unable to parse model identification");
+ g_object_unref(parent);
+ goto bail;
+ }
+ } else {
+ g_assert(*bus == WBUSTYPE_SERIAL);
+
+ *vendor_id = 0;
+ *product_id = 0;
}
if (parent)
g_object_unref (parent);
@@ -278,6 +334,8 @@
int
libwacom_compare(WacomDevice *a, WacomDevice *b, WacomCompareFlags flags)
{
+ g_return_val_if_fail(a || b, 0);
+
if ((a && !b) || (b && !a))
return 1;
diff -Nru libwacom-0.5/libwacom/libwacom-database.c libwacom-0.6/libwacom/libwacom-database.c
--- libwacom-0.5/libwacom/libwacom-database.c 2012-05-01 05:01:56.000000000 +0200
+++ libwacom-0.6/libwacom/libwacom-database.c 2012-06-04 01:59:08.000000000 +0200
@@ -142,7 +142,7 @@
return 0;
strs = g_strsplit(match, ";", 0);
- for (i = 0; strs[i] != NULL; i++) {
+ for (i = 0; strs[i] != NULL && *strs[i] != '\0'; i++) {
char busstr[64];
int vendor_id, product_id;
WacomBusType bus;
@@ -369,9 +369,10 @@
g_strfreev (styli_list);
device->supported_styli = (int *) g_array_free (array, FALSE);
} else {
- device->supported_styli = g_new (int, 1);
- *device->supported_styli = 0xfffff;
- device->num_styli = 1;
+ device->supported_styli = g_new (int, 2);
+ device->supported_styli[0] = WACOM_STYLUS_FALLBACK_ID;
+ device->supported_styli[1] = WACOM_ERASER_FALLBACK_ID;
+ device->num_styli = 2;
}
/* Features */
diff -Nru libwacom-0.5/missing libwacom-0.6/missing
diff -Nru libwacom-0.5/NEWS libwacom-0.6/NEWS
--- libwacom-0.5/NEWS 2012-05-02 02:59:13.000000000 +0200
+++ libwacom-0.6/NEWS 2012-06-26 03:57:13.000000000 +0200
@@ -1,3 +1,10 @@
+libwacom 0.6:
+- More metadata for:
+ - NTrig tablet PC
+ - ISDv4 0x93, 0x90, 0xED, 0xEF
+ - Bamboo Pen, Fun, Craft, Touch
+- Support for debugging with uinput devices
+
libwacom 0.5:
- Add support for multiple match statements
- Add support for bluetotooth devices
diff -Nru libwacom-0.5/README libwacom-0.6/README
--- libwacom-0.5/README 2011-11-28 23:32:59.000000000 +0100
+++ libwacom-0.6/README 2012-06-04 01:59:08.000000000 +0200
@@ -1,3 +1,20 @@
libwacom is a library to identify wacom tablets and their model-specific
features. It provides easy access to information such as "is this a built-in
on-screen tablet", "what is the size of this model", etc.
+
+== Debugging libwacom with uinput devices ==
+libwacom by default will not recognise uinput devices. To debug and test, a
+physical device must be connected.
+
+Custom udev rules are provided to help debug uinput device. Run
+ generate-udev-rules --with-uinput-rules
+to generate these rules and apply them locally. Devices will then be tagged
+as required and can be debugged.
+
+Some limitations:
+* For these rules to work, the device must be listed in the database.
+* libwacom will check UINPUT_* properties on the uinput device, if they do
+ not get applied, the device will not be visible
+
+DO NOT USE THESE UINPUT RULES unless you are debugging with uinput devices.
+Remove the rules once debugging is done.
diff -Nru libwacom-0.5/test/dbverify.c libwacom-0.6/test/dbverify.c
--- libwacom-0.5/test/dbverify.c 2012-04-30 07:47:53.000000000 +0200
+++ libwacom-0.6/test/dbverify.c 2012-06-25 02:41:24.000000000 +0200
@@ -127,8 +127,8 @@
assert(*devices);
dirname = strdup("tmp.dbverify.XXXXXX");
- dirname = mkdtemp(dirname);
- assert(dirname);
+ assert(mkdtemp(dirname)); /* just check for non-null to avoid
+ Coverity complaints */
for (device = devices, i = 0; *device; device++, i++) {
int i;
@@ -159,6 +159,7 @@
fd_stylus = open(path, O_WRONLY|O_CREAT, S_IRWXU);
assert(fd_stylus >= 0);
libwacom_print_stylus_description(fd_stylus, stylus);
+ close(fd_stylus);
}
}
diff -Nru libwacom-0.5/test/Makefile.am libwacom-0.6/test/Makefile.am
--- libwacom-0.5/test/Makefile.am 2012-05-01 05:07:35.000000000 +0200
+++ libwacom-0.6/test/Makefile.am 2012-06-04 01:59:08.000000000 +0200
@@ -7,3 +7,9 @@
load_LDADD=$(top_builddir)/libwacom/libwacom.la
dbverify_LDADD=$(top_builddir)/libwacom/libwacom.la
tablet_validity_LDADD=$(top_builddir)/libwacom/libwacom.la
+
+clean-local: clean-local-check
+.PHONY: clean-local-check
+
+clean-local-check:
+ rm -rf tmp.dbverify.*
diff -Nru libwacom-0.5/test/Makefile.in libwacom-0.6/test/Makefile.in
diff -Nru libwacom-0.5/test/tablet-validity.c libwacom-0.6/test/tablet-validity.c
--- libwacom-0.5/test/tablet-validity.c 2012-05-01 05:07:35.000000000 +0200
+++ libwacom-0.6/test/tablet-validity.c 2012-06-04 02:02:39.000000000 +0200
@@ -40,10 +40,26 @@
#include <assert.h>
#include <unistd.h>
-static void verify_tablet(WacomDevice *device)
+static int eraser_is_present(WacomDeviceDatabase *db, const int *styli, int nstyli, WacomStylusType type)
+{
+ int i;
+
+ for (i = 0; i < nstyli; i++) {
+ const WacomStylus *stylus;
+ stylus = libwacom_stylus_get_for_id (db, styli[i]);
+ if (libwacom_stylus_is_eraser (stylus) &&
+ libwacom_stylus_get_type (stylus) == type)
+ return 1;
+ }
+
+ return 0;
+}
+
+static void verify_tablet(WacomDeviceDatabase *db, WacomDevice *device)
{
const char *name;
- int nstyli;
+ const int *styli;
+ int nstyli, i;
name = libwacom_get_name(device);
if (strcmp(name, "Generic") == 0)
@@ -65,8 +81,46 @@
assert(libwacom_get_height(device) > 0);
}
assert(libwacom_get_num_buttons(device) >= 0);
- assert(libwacom_get_supported_styli(device, &nstyli) != NULL);
- assert(nstyli > 0);
+
+ styli = libwacom_get_supported_styli(device, &nstyli);
+ assert(styli != NULL);
+ assert(nstyli >= 1);
+
+ switch(libwacom_get_class(device)) {
+ case WCLASS_BAMBOO:
+ case WCLASS_ISDV4:
+ case WCLASS_PEN_DISPLAYS:
+ case WCLASS_GRAPHIRE:
+ break;
+ case WCLASS_INTUOS:
+ case WCLASS_INTUOS2:
+ case WCLASS_INTUOS3:
+ case WCLASS_INTUOS4:
+ case WCLASS_CINTIQ:
+ {
+ int i;
+ for (i = 0; i < nstyli; i++) {
+ assert(styli[i] != WACOM_STYLUS_FALLBACK_ID);
+ assert(styli[i] != WACOM_ERASER_FALLBACK_ID);
+ }
+ }
+ default:
+ assert(1); /* don't get here */
+ }
+
+ for (i = 0; i < nstyli; i++) {
+ const WacomStylus *stylus;
+ const char *stylus_name;
+ stylus = libwacom_stylus_get_for_id (db, styli[i]);
+ assert(stylus);
+ stylus_name = libwacom_stylus_get_name (stylus);
+ assert(stylus_name);
+ if (libwacom_stylus_has_eraser (stylus)) {
+ WacomStylusType type;
+ type = libwacom_stylus_get_type (stylus);
+ assert(eraser_is_present (db, styli, nstyli, type));
+ }
+ }
assert(libwacom_get_ring_num_modes(device) >= 0);
assert(libwacom_get_ring2_num_modes(device) >= 0);
assert(libwacom_get_num_strips(device) >= 0);
@@ -89,7 +143,7 @@
assert(*devices);
for (device = devices; *device; device++)
- verify_tablet(*device);
+ verify_tablet(db, *device);
libwacom_database_destroy (db);
diff -Nru libwacom-0.5/tools/generate-udev-rules.c libwacom-0.6/tools/generate-udev-rules.c
--- libwacom-0.5/tools/generate-udev-rules.c 2012-04-30 06:29:47.000000000 +0200
+++ libwacom-0.6/tools/generate-udev-rules.c 2012-06-04 01:59:08.000000000 +0200
@@ -29,8 +29,18 @@
#endif
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "libwacom.h"
+#include <glib/gi18n.h>
+#include <glib.h>
+
+static gboolean need_uinput_rules = FALSE;
+
+static GOptionEntry opts[] = {
+ {"with-uinput-rules", 0, 0, G_OPTION_ARG_NONE, &need_uinput_rules, N_("Print udev rules for uinput devices"), NULL },
+ {NULL}
+};
static void print_udev_header (void)
{
@@ -48,7 +58,7 @@
int vendor = libwacom_match_get_vendor_id (match);
int product = libwacom_match_get_product_id (match);
int has_touch = libwacom_has_touch (device);
- static char *touchpad;
+ char *touchpad;
if (bus_type_filter != type)
return;
@@ -73,6 +83,45 @@
}
}
+static void print_uinput_entry_for_match (WacomDevice *device, const WacomMatch *match,
+ WacomBusType bus_type_filter)
+{
+ WacomBusType type = libwacom_match_get_bustype (match);
+ int vendor = libwacom_match_get_vendor_id (match);
+ int product = libwacom_match_get_product_id (match);
+ const char *subsystem;
+
+ if (bus_type_filter != type)
+ return;
+
+ switch(type) {
+ case WBUSTYPE_USB: subsystem = "usb"; break;
+ case WBUSTYPE_BLUETOOTH: subsystem = "bluetooth"; break;
+ case WBUSTYPE_SERIAL: subsystem = "tty"; break;
+ default:
+ return;
+ }
+
+ printf("ENV{DEVPATH}==\"/devices/virtual/*\", "
+ "ENV{PRODUCT}==\"*/%x/%x/*\", "
+ "ENV{UINPUT_DEVICE}=\"1\", "
+ "ENV{UINPUT_SUBSYSTEM}=\"%s\", "
+ "ENV{ID_VENDOR_ID}=\"%04x\", "
+ "ENV{ID_MODEL_ID}=\"%04x\", "
+ "\n", vendor, product,
+ subsystem, vendor, product);
+}
+
+static void print_uinput_entry (WacomDevice *device, WacomBusType bus_type_filter)
+{
+ const WacomMatch **matches, **match;
+
+ matches = libwacom_get_matches(device);
+ for (match = matches; *match; match++)
+ print_uinput_entry_for_match(device, *match, bus_type_filter);
+}
+
+
static void print_udev_entry (WacomDevice *device, WacomBusType bus_type_filter)
{
const WacomMatch **matches, **match;
@@ -97,6 +146,22 @@
{
WacomDeviceDatabase *db;
WacomDevice **list, **p;
+ GOptionContext *context;
+ GError *error;
+
+ context = g_option_context_new (NULL);
+
+ g_option_context_add_main_entries (context, opts, NULL);
+ error = NULL;
+
+ if (!g_option_context_parse (context, &argc, &argv, &error)) {
+ if (error != NULL) {
+ fprintf (stderr, "%s\n", error->message);
+ g_error_free (error);
+ }
+ return EXIT_FAILURE;
+ }
+
db = libwacom_database_new_for_path(TOPSRCDIR"/data");
@@ -109,11 +174,19 @@
print_udev_header ();
for (p = list; *p; p++)
print_udev_entry ((WacomDevice *) *p, WBUSTYPE_USB);
+
print_udev_trailer ();
for (p = list; *p; p++)
print_udev_entry ((WacomDevice *) *p, WBUSTYPE_BLUETOOTH);
+ if (need_uinput_rules) {
+ for (p = list; *p; p++)
+ print_uinput_entry ((WacomDevice *) *p, WBUSTYPE_USB);
+ for (p = list; *p; p++)
+ print_uinput_entry ((WacomDevice *) *p, WBUSTYPE_BLUETOOTH);
+ }
+
libwacom_database_destroy (db);
return 0;
diff -Nru libwacom-0.5/tools/Makefile.am libwacom-0.6/tools/Makefile.am
--- libwacom-0.5/tools/Makefile.am 2012-05-01 05:07:35.000000000 +0200
+++ libwacom-0.6/tools/Makefile.am 2012-06-04 01:59:08.000000000 +0200
@@ -2,13 +2,14 @@
noinst_PROGRAMS = generate-udev-rules list-devices
generate_udev_rules_SOURCES = generate-udev-rules.c
-generate_udev_rules_LDADD=$(top_builddir)/libwacom/libwacom.la
+generate_udev_rules_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS)
+generate_udev_rules_CFLAGS=$(GLIB_CFLAGS)
list_devices_SOURCES = list-devices.c
list_devices_LDADD=$(top_builddir)/libwacom/libwacom.la
bin_PROGRAMS = libwacom-list-local-devices
libwacom_list_local_devices_SOURCES = list-local-devices.c
-libwacom_list_local_devices_LDADD=$(top_builddir)/libwacom/libwacom.la
+libwacom_list_local_devices_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS)
libwacom_list_local_devices_CFLAGS=$(GLIB_CFLAGS)
diff -Nru libwacom-0.5/tools/Makefile.in libwacom-0.6/tools/Makefile.in
--- End Message ---