Re: [Linuxwacom-devel] [PATCH] data: Cintiq 24HD touch

2012-11-07 Thread Jason Gerecke
On Wed, Nov 7, 2012 at 3:00 PM, Peter Hutterer  wrote:
> On Wed, Oct 24, 2012 at 03:15:28PM -0700, Jason Gerecke wrote:
>> Signed-off-by: Jason Gerecke 
>> ---
>> I'm not sure if this is the "right" way to define this tablet since it
>> presents itself to the system as more than one USB device. Its got what
>> is essentially a vanilla 24HD at 056a:00f8, and the touch sensor at
>> 056a:00f6.
>>
>> Do we want to have a single definition file for what is a single
>> "logical" tablet? If so, should 056a:00f6 be mentioned on the
>> DeviceMatch line, and should "Touch=True"?
>
> the bamboos do that, don't they? And they have the same data descriptions as
> below, pretty much. Not 100% sure on the match line, we can add additional
> matches but is this what we want here?
>
> Merged this patch, if I'm wrong we'll fix it then.
>
> Cheers,
>Peter
>
The Bamboos and I5 are similar, but not quite the same. In their case,
pen and touch data come from different endpoints on the same USB
device. In the case of the 24HDT, the device appears to the kernel as
a USB hub with two different tablets already connected to it. The only
reason this may be of interest is if gnome-settings-daemon were to see
the two devices as independent. At the moment it seems to ignore the
touchscreen device entirely, which is fine for most purposes*.


*I just realized I haven't tried the 24HDT in a multi-head setup.
Ignoring the touchscreen would be the wrong thing to do here, since it
shouldn't be mapped to the whole desktop. I'll have to clean off some
additional desk space tomorrow to make room...

Jason

---
When you're rife with devastation / There's a simple explanation:
You're a toymaker's creation / Trapped inside a crystal ball.
And whichever way he tilts it / Know that we must be resilient
We won't let them break our spirits / As we sing our silly song.

>>
>>  data/cintiq-24hd-touch.tablet | 65 
>> +++
>>  1 file changed, 65 insertions(+)
>>  create mode 100644 data/cintiq-24hd-touch.tablet
>>
>> diff --git a/data/cintiq-24hd-touch.tablet b/data/cintiq-24hd-touch.tablet
>> new file mode 100644
>> index 000..c672bbd
>> --- /dev/null
>> +++ b/data/cintiq-24hd-touch.tablet
>> @@ -0,0 +1,65 @@
>> +# Wacom
>> +# Cintiq 24HD touch
>> +# DTH-2400
>> +#
>> +# Button Map:
>> +# (A=1, B=2, C=3, ...)
>> +#
>> +#   *---*
>> +#   |   |
>> +#  A|   |I
>> +#  B|   |J
>> +#  C|DISPLAY|K
>> +#  DEFF |   | NNML
>> +#  DEGG |   | OOML
>> +#  DEHH |   | PPML
>> +#   |   |
>> +#   *---*
>> +#
>> +# Touch Ring Map:
>> +# (A=1st ring, B=2nd ring, ...)
>> +#
>> +#*---*
>> +#|   |
>> +#  A |DISPLAY| B
>> +#|   |
>> +#*---*
>> +#
>> +# LED Map:
>> +# (XY=Bank X, LED Y; *=Invisible)
>> +#
>> +# *---*
>> +# |   |
>> +#  10 |   | 00
>> +#  11 |   | 01
>> +#  12 |DISPLAY| 02
>> +#  1* |   | 0*
>> +# |   |
>> +# *---*
>> +#
>> +# Note: touch data comes through the usb:056a:00f6 interface
>> +
>> +[Device]
>> +Name=Wacom Cintiq 24HD touch
>> +DeviceMatch=usb:056a:00f8
>> +Class=Cintiq
>> +Width=21
>> +Height=13
>> +Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;
>> +
>> +[Features]
>> +Stylus=true
>> +Reversible=false
>> +Touch=true
>> +Buttons=16
>> +Ring=true
>> +Ring2=true
>> +BuiltIn=true
>> +StatusLEDs=Ring2;Ring
>> +
>> +[Buttons]
>> +Left=A;B;C;D;E;F;G;H
>> +Right=I;J;K;L;M;N;O;P
>> +
>> +Ring=A;B;C
>> +Ring2=I;J;K
>> --
>> 1.8.0
>>
>>

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH libwacom] Add three MT ISDv4 devices (E5, 100, 101)

2012-11-07 Thread Peter Hutterer
On Thu, Oct 25, 2012 at 05:50:14PM -0700, Ping Cheng wrote:
> Signed-off-by: 
> ---
>  data/isdv4-100.tablet |   14 ++
>  data/isdv4-101.tablet |   14 ++
>  data/isdv4-e5.tablet  |   14 ++
>  3 files changed, 42 insertions(+), 0 deletions(-)
>  create mode 100644 data/isdv4-100.tablet
>  create mode 100644 data/isdv4-101.tablet
>  create mode 100644 data/isdv4-e5.tablet
> 
> diff --git a/data/isdv4-100.tablet b/data/isdv4-100.tablet
> new file mode 100644
> index 000..3a78ee3
> --- /dev/null
> +++ b/data/isdv4-100.tablet
> @@ -0,0 +1,14 @@
> +# this is for Wacom MT touchscreen 0x0100 (10 fingers)
> +
> +[Device]
> +Name=Wacom ISDv4 100

just confirming this - the other two are E101 and E4, this one is just 100.
is this intended?

Let me know either way and I'll fix it before pushing (if required)

Cheers,
   Peter

> +DeviceMatch=usb:056a:0100
> +Class=ISDV4
> +Width=11
> +Height=6
> +
> +[Features]
> +Stylus=false
> +Touch=true
> +BuiltIn=true
> +Buttons=0
> diff --git a/data/isdv4-101.tablet b/data/isdv4-101.tablet
> new file mode 100644
> index 000..498c751
> --- /dev/null
> +++ b/data/isdv4-101.tablet
> @@ -0,0 +1,14 @@
> +# this is for the Wacom pen + touchscreen as found in the Fujitsu T902
> +
> +[Device]
> +Name=Wacom ISDv4 E101
> +DeviceMatch=usb:056a:0101
> +Class=ISDV4
> +Width=11
> +Height=6
> +
> +[Features]
> +Stylus=true
> +Touch=true
> +BuiltIn=true
> +Buttons=0
> diff --git a/data/isdv4-e5.tablet b/data/isdv4-e5.tablet
> new file mode 100644
> index 000..a22f476
> --- /dev/null
> +++ b/data/isdv4-e5.tablet
> @@ -0,0 +1,14 @@
> +# this is for Wacom MT touchscreen E5 (10 fingers)
> +
> +[Device]
> +Name=Wacom ISDv4 E5
> +DeviceMatch=usb:056a:00e5
> +Class=ISDV4
> +Width=11
> +Height=6
> +
> +[Features]
> +Stylus=false
> +Touch=true
> +BuiltIn=true
> +Buttons=0
> -- 
> 1.7.1
> 
> 
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> ___
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
> 

--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH] data: Cintiq 24HD touch

2012-11-07 Thread Peter Hutterer
On Wed, Oct 24, 2012 at 03:15:28PM -0700, Jason Gerecke wrote:
> Signed-off-by: Jason Gerecke 
> ---
> I'm not sure if this is the "right" way to define this tablet since it 
> presents itself to the system as more than one USB device. Its got what 
> is essentially a vanilla 24HD at 056a:00f8, and the touch sensor at 
> 056a:00f6.
> 
> Do we want to have a single definition file for what is a single 
> "logical" tablet? If so, should 056a:00f6 be mentioned on the 
> DeviceMatch line, and should "Touch=True"?

the bamboos do that, don't they? And they have the same data descriptions as
below, pretty much. Not 100% sure on the match line, we can add additional
matches but is this what we want here?

Merged this patch, if I'm wrong we'll fix it then.

Cheers,
   Peter

> 
>  data/cintiq-24hd-touch.tablet | 65 
> +++
>  1 file changed, 65 insertions(+)
>  create mode 100644 data/cintiq-24hd-touch.tablet
> 
> diff --git a/data/cintiq-24hd-touch.tablet b/data/cintiq-24hd-touch.tablet
> new file mode 100644
> index 000..c672bbd
> --- /dev/null
> +++ b/data/cintiq-24hd-touch.tablet
> @@ -0,0 +1,65 @@
> +# Wacom
> +# Cintiq 24HD touch
> +# DTH-2400
> +#
> +# Button Map:
> +# (A=1, B=2, C=3, ...)
> +#
> +#   *---*
> +#   |   |
> +#  A|   |I
> +#  B|   |J
> +#  C|DISPLAY|K
> +#  DEFF |   | NNML
> +#  DEGG |   | OOML
> +#  DEHH |   | PPML
> +#   |   |
> +#   *---*
> +#
> +# Touch Ring Map:
> +# (A=1st ring, B=2nd ring, ...)
> +#
> +#*---*
> +#|   |
> +#  A |DISPLAY| B
> +#|   |
> +#*---*
> +#
> +# LED Map:
> +# (XY=Bank X, LED Y; *=Invisible)
> +#
> +# *---*
> +# |   |
> +#  10 |   | 00
> +#  11 |   | 01
> +#  12 |DISPLAY| 02
> +#  1* |   | 0*
> +# |   |
> +# *---*
> +#
> +# Note: touch data comes through the usb:056a:00f6 interface
> +
> +[Device]
> +Name=Wacom Cintiq 24HD touch
> +DeviceMatch=usb:056a:00f8
> +Class=Cintiq
> +Width=21
> +Height=13
> +Styli=0x802;0x80c;0x804;0x80a;0x40802;0x4080a;0x902;0x90a;0x20802;
> +
> +[Features]
> +Stylus=true
> +Reversible=false
> +Touch=true
> +Buttons=16
> +Ring=true
> +Ring2=true
> +BuiltIn=true
> +StatusLEDs=Ring2;Ring
> +
> +[Buttons]
> +Left=A;B;C;D;E;F;G;H
> +Right=I;J;K;L;M;N;O;P
> +
> +Ring=A;B;C
> +Ring2=I;J;K
> -- 
> 1.8.0
> 
> 
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> ___
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
> 

--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] libwacom: [PATCH 3/3] lib: add "IntegratedIn" to device group

2012-11-07 Thread Olivier Fourdan


>From 15f93f5d3bd9f2aefd59a5087b2ce44a3c53403c Mon Sep 17 00:00:00 2001
From: Olivier Fourdan 
Date: Thu, 11 Oct 2012 12:04:45 +0200
Subject: [PATCH 3/3] lib: add "IntegratedIn" to device group

to describe integrated system devices and screen tablets.

A bit field allows to identify the level of integration of
a device:

WACOM_DEVICE_INTEGRATED_NONEdevice is a standalone tablet
WACOM_DEVICE_INTEGRATED_DISPLAY device is a screen tablet
WACOM_DEVICE_INTEGRATED_SYSTEM  device is an ISD such as
a tablet PC.

Or -1 (WACOM_DEVICE_INTEGRATED_UNSET) if the information is not
available

These definitions supersede the previous libwacom_is_builtin()
API which is now deprecated.

Signed-off-by: Olivier Fourdan 
---
 libwacom/libwacom-database.c |   59 ++--
 libwacom/libwacom.c  |   67 +
 libwacom/libwacom.h  |   24 ++-
 libwacom/libwacomint.h   |   10 +-
 4 files changed, 113 insertions(+), 47 deletions(-)

diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
index bbea114..ae73239 100644
--- a/libwacom/libwacom-database.c
+++ b/libwacom/libwacom-database.c
@@ -256,6 +256,14 @@ struct {
 	{ "Touchstrip2",	WACOM_STATUS_LED_TOUCHSTRIP2 }
 };
 
+struct {
+	const char *key;
+	WacomIntegrationFlags   value;
+} integration_flags[] = {
+	{ "Display",		WACOM_DEVICE_INTEGRATED_DISPLAY },
+	{ "System",		WACOM_DEVICE_INTEGRATED_SYSTEM }
+};
+
 static void
 libwacom_parse_buttons_key(WacomDevice  *device,
 			   GKeyFile *keyfile,
@@ -329,8 +337,7 @@ libwacom_parse_tablet_keyfile(const char *datadir, const char *filename)
 	char *layout;
 	char *class;
 	char *match;
-	char **styli_list;
-	char **leds_list;
+	char **string_list;
 
 	keyfile = g_key_file_new();
 
@@ -361,31 +368,50 @@ libwacom_parse_tablet_keyfile(const char *datadir, const char *filename)
 	device->name = g_key_file_get_string(keyfile, DEVICE_GROUP, "Name", NULL);
 	device->width = g_key_file_get_integer(keyfile, DEVICE_GROUP, "Width", NULL);
 	device->height = g_key_file_get_integer(keyfile, DEVICE_GROUP, "Height", NULL);
+
+	device->integration_flags = WACOM_DEVICE_INTEGRATED_UNSET;
+	string_list = g_key_file_get_string_list(keyfile, DEVICE_GROUP, "IntegratedIn", NULL, NULL);
+	if (string_list) {
+		guint i, n;
+
+		device->integration_flags = WACOM_DEVICE_INTEGRATED_NONE;
+		for (i = 0; string_list[i]; i++) {
+			for (n = 0; n < G_N_ELEMENTS (integration_flags); n++) {
+if (!strcmp(string_list[i], integration_flags[n].key)) {
+	device->integration_flags |= integration_flags[n].value;
+	break;
+}
+			}
+		}
+		g_strfreev (string_list);
+	}
+
 	layout = g_key_file_get_string(keyfile, DEVICE_GROUP, "Layout", NULL);
 	if (layout) {
 		/* For the layout, we store the full path to the SVG layout */
 		device->layout = g_build_filename (datadir, "layouts", layout, NULL);
 		g_free (layout);
 	}
+
 	class = g_key_file_get_string(keyfile, DEVICE_GROUP, "Class", NULL);
 	device->cls = libwacom_class_string_to_enum(class);
 	g_free(class);
 
-	styli_list = g_key_file_get_string_list(keyfile, DEVICE_GROUP, "Styli", NULL, NULL);
-	if (styli_list) {
+	string_list = g_key_file_get_string_list(keyfile, DEVICE_GROUP, "Styli", NULL, NULL);
+	if (string_list) {
 		GArray *array;
 		guint i;
 
 		array = g_array_new (FALSE, FALSE, sizeof(int));
 		device->num_styli = 0;
-		for (i = 0; styli_list[i]; i++) {
-			glong long_value = strtol (styli_list[i], NULL, 0);
+		for (i = 0; string_list[i]; i++) {
+			glong long_value = strtol (string_list[i], NULL, 0);
 			int int_value = long_value;
 
 			g_array_append_val (array, int_value);
 			device->num_styli++;
 		}
-		g_strfreev (styli_list);
+		g_strfreev (string_list);
 		device->supported_styli = (int *) g_array_free (array, FALSE);
 	} else {
 		device->supported_styli = g_new (int, 2);
@@ -407,15 +433,13 @@ libwacom_parse_tablet_keyfile(const char *datadir, const char *filename)
 	if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Ring2", NULL))
 		device->features |= FEATURE_RING2;
 
-	if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "BuiltIn", NULL))
-		device->features |= FEATURE_BUILTIN;
-
 	if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, "Reversible", NULL))
 		device->features |= FEATURE_REVERSIBLE;
 
-	if (device->features & FEATURE_BUILTIN &&
+	if (device->integration_flags != WACOM_DEVICE_INTEGRATED_UNSET &&
+	device->integration_flags & WACOM_DEVICE_INTEGRATED_DISPLAY &&
 	device->features & FEATURE_REVERSIBLE)
-		g_warning ("Tablet '%s' is both reversible and builtin. This is impossible", libwacom_get_match(device));
+		g_warning ("Tablet '%s' is both reversible and integrated in screen. This is impossible", libwacom_get_match(device));
 
 	if (!(device->features & FEATURE_RING) &&
 	(device->features & FEATURE_RING2))
@@ -433,22 +457,23 @@ libwacom_parse_tablet_keyfile(const cha

[Linuxwacom-devel] libwacom: [PATCH 2/3] data: add the IntegratedIn field to the tablet definitions

2012-11-07 Thread Olivier Fourdan


>From 2b5b09ec4691e1fa239bee43fcf038c679b3eeeb Mon Sep 17 00:00:00 2001
From: Olivier Fourdan 
Date: Mon, 8 Oct 2012 16:02:39 +0200
Subject: [PATCH 2/3] data: add the IntegratedIn field to the tablet definitions

If set, "IntegratedIn" specifies if the device is integrated
in the "Display" (screen tablet) and/or "System" (ISD, TabletPC).

This field supersedes the "BuiltIn" value.

Signed-off-by: Olivier Fourdan 
---
 data/bamboo-2fg-4x5.tablet|1 -
 data/bamboo-2fg-6x8.tablet|1 -
 data/bamboo-2fg.tablet|1 -
 data/bamboo-craft.tablet  |1 -
 data/bamboo-one.tablet|1 -
 data/bamboo-pen.tablet|1 -
 data/cintiq-12wx.tablet   |2 +-
 data/cintiq-20wsx.tablet  |2 +-
 data/cintiq-21ux.tablet   |2 +-
 data/cintiq-21ux2.tablet  |2 +-
 data/cintiq-22hd.tablet   |2 +-
 data/cintiq-24hd.tablet   |2 +-
 data/dtf-720.tablet   |2 +-
 data/dti-520.tablet   |2 +-
 data/dtu-1631.tablet  |2 +-
 data/dtu-2231.tablet  |2 +-
 data/generic.tablet   |1 -
 data/graphire-wireless-8x6.tablet |1 -
 data/intuos4-12x19.tablet |1 -
 data/intuos4-4x6.tablet   |1 -
 data/intuos4-6x9-wl.tablet|1 -
 data/intuos4-6x9.tablet   |1 -
 data/intuos4-8x13.tablet  |1 -
 data/intuos5-m.tablet |1 -
 data/intuos5-s.tablet |1 -
 data/intuos5-touch-l.tablet   |1 -
 data/intuos5-touch-m.tablet   |1 -
 data/intuos5-touch-s.tablet   |1 -
 data/isdv4-90.tablet  |2 +-
 data/isdv4-93.tablet  |2 +-
 data/isdv4-e3.tablet  |2 +-
 data/isdv4-e6.tablet  |2 +-
 data/isdv4-ed.tablet  |2 +-
 data/isdv4-ef.tablet  |2 +-
 data/n-trig-pen.tablet|2 +-
 data/serial-wacf004.tablet|2 +-
 data/wacom.example|   12 +---
 37 files changed, 23 insertions(+), 43 deletions(-)

diff --git a/data/bamboo-2fg-4x5.tablet b/data/bamboo-2fg-4x5.tablet
index fb0cb90..812638f 100644
--- a/data/bamboo-2fg-4x5.tablet
+++ b/data/bamboo-2fg-4x5.tablet
@@ -20,7 +20,6 @@ Stylus=true
 Reversible=true
 Touch=true
 Buttons=4
-BuiltIn=false
 
 [Buttons]
 Left=A;B;C;D
diff --git a/data/bamboo-2fg-6x8.tablet b/data/bamboo-2fg-6x8.tablet
index d7bf97c..c9288d8 100644
--- a/data/bamboo-2fg-6x8.tablet
+++ b/data/bamboo-2fg-6x8.tablet
@@ -20,7 +20,6 @@ Stylus=true
 Reversible=true
 Touch=true
 Buttons=4
-BuiltIn=false
 
 [Buttons]
 Left=A;B;C;D
diff --git a/data/bamboo-2fg.tablet b/data/bamboo-2fg.tablet
index 4e74ccd..ffea220 100644
--- a/data/bamboo-2fg.tablet
+++ b/data/bamboo-2fg.tablet
@@ -19,7 +19,6 @@ Stylus=false
 Reversible=true
 Touch=true
 Buttons=4
-BuiltIn=false
 
 [Buttons]
 Left=A;B;C;D
diff --git a/data/bamboo-craft.tablet b/data/bamboo-craft.tablet
index e68ca5d..dc1bfce 100644
--- a/data/bamboo-craft.tablet
+++ b/data/bamboo-craft.tablet
@@ -20,7 +20,6 @@ Stylus=true
 Reversible=true
 Touch=true
 Buttons=4
-BuiltIn=false
 
 [Buttons]
 Left=A;B;C;D
diff --git a/data/bamboo-one.tablet b/data/bamboo-one.tablet
index feacf54..1d553a8 100644
--- a/data/bamboo-one.tablet
+++ b/data/bamboo-one.tablet
@@ -13,4 +13,3 @@ Touch=false
 Ring=false
 NumStrips=0
 Buttons=0
-BuiltIn=false
diff --git a/data/bamboo-pen.tablet b/data/bamboo-pen.tablet
index a5b5aea..a897b71 100644
--- a/data/bamboo-pen.tablet
+++ b/data/bamboo-pen.tablet
@@ -19,4 +19,3 @@ Stylus=true
 Reversible=true
 Touch=false
 Buttons=0
-BuiltIn=false
diff --git a/data/cintiq-12wx.tablet b/data/cintiq-12wx.tablet
index 006500d..75b2457 100644
--- a/data/cintiq-12wx.tablet
+++ b/data/cintiq-12wx.tablet
@@ -38,12 +38,12 @@ Width=10
 Height=7
 Layout=cintiq-12wx.svg
 Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+IntegratedIn=Display
 
 [Features]
 Stylus=true
 NumStrips=2
 Buttons=10
-BuiltIn=true
 
 [Buttons]
 Left=A;B;C;D;I
diff --git a/data/cintiq-20wsx.tablet b/data/cintiq-20wsx.tablet
index 3cc6c23..4bc91d0 100644
--- a/data/cintiq-20wsx.tablet
+++ b/data/cintiq-20wsx.tablet
@@ -40,13 +40,13 @@ Class=Cintiq
 Width=17
 Height=11
 Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+IntegratedIn=Display
 
 [Features]
 Reversible=false
 Stylus=true
 NumStrips=2
 Buttons=14
-BuiltIn=true
 
 [Buttons]
 Left=A;B;C;D;I;K;L
diff --git a/data/cintiq-21ux.tablet b/data/cintiq-21ux.tablet
index 30d3922..1c353a4 100644
--- a/data/cintiq-21ux.tablet
+++ b/data/cintiq-21ux.tablet
@@ -33,13 +33,13 @@ Class=Cintiq
 Width=17
 Height=13
 Styli=0x913;0x91b;0x813;0x81b;0x823;0x82b;0x801;0x885;
+IntegratedIn=Display
 
 [Features]
 Reversible=false
 Stylus=true
 NumStrips=2
 Buttons=8
-BuiltIn=true
 
 [Buttons]
 Left=A;B;C;D
diff --git a/data/cintiq-21ux2.tablet b/data/cintiq-21ux2.tablet
index 85f2686..734f9f3 100644
--- a/data/cintiq-21ux2.tablet

[Linuxwacom-devel] libwacom: [PATCH 1/3] lib: use kernel flags if available

2012-11-07 Thread Olivier Fourdan


>From 11d5e6d38e8237d131153aa5a963393e295208b8 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan 
Date: Thu, 11 Oct 2012 10:32:10 +0200
Subject: [PATCH 1/3] lib: use kernel flags if available

to identify screen tablets if not set in the database.

To properly ensure the device is a screen tablet
check DIRECT flag is set but not POINTER.

Signed-off-by: Olivier Fourdan 
---
 configure.ac|1 +
 libwacom/libwacom.c |   28 +---
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 64f4890..3079c5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,7 @@ AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], [yes], [no])
 AM_CONDITIONAL(HAVE_DOXYGEN, test "x$HAVE_DOXYGEN" = xyes)
 
 PKG_CHECK_MODULES(GLIB, glib-2.0 gudev-1.0)
+AC_CHECK_HEADERS(linux/input.h)
 
 PKG_CHECK_MODULES(LIBXML, libxml-2.0 glib-2.0, HAVE_LIBXML="yes", HAVE_LIBXML="no")
 AM_CONDITIONAL(HAVE_LIBXML, test x$HAVE_LIBXML = xyes)
diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index 25efa1b..d1a 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -34,6 +34,19 @@
 #include 
 #include 
 
+#ifdef HAVE_LINUX_INPUT_H
+#include 
+#endif
+
+/* Defined in linux/input.h but older versions may be missing these definitions */
+#ifndef INPUT_PROP_POINTER
+#define INPUT_PROP_POINTER		0x00	/* needs a pointer */
+#endif
+
+#ifndef INPUT_PROP_DIRECT
+#define INPUT_PROP_DIRECT		0x01	/* direct input devices */
+#endif
+
 static const WacomDevice *
 libwacom_get_device(WacomDeviceDatabase *db, const char *match)
 {
@@ -163,10 +176,19 @@ get_device_info (const char   *path,
 		if (g_file_get_contents (sysfs_path, &contents, NULL, NULL)) {
 			int flag;
 
-			/* 0x01: POINTER flag
-			 * 0x02: DIRECT flag */
 			flag = atoi(contents);
-			*builtin = (flag & 0x02) == 0x02 ? IS_BUILTIN_TRUE : IS_BUILTIN_FALSE;
+			flag &= (1 << INPUT_PROP_DIRECT) | (1 << INPUT_PROP_POINTER);
+			/*
+			 * To ensure we are dealing with a screen tablet, need
+			 * to check that it has DIRECT and non-POINTER (DIRECT
+			 * alone is not sufficient since it's set for drawing
+			 * tablets as well)
+			 */
+			if (flag == (1 << INPUT_PROP_DIRECT))
+*builtin = IS_BUILTIN_TRUE;
+			else
+*builtin = IS_BUILTIN_FALSE;
+
 			g_free (contents);
 		}
 		g_free (sysfs_path);
-- 
1.7.1

--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] libwacom: [PATCH 0/3] Resend the integration series of patches

2012-11-07 Thread Olivier Fourdan
Hi

While reviewing the pending patches here, I realised that the ones 
relative to the integration bits were never merged.

I am resending these updated to apply to current git master (after the 
merge of the layout patches)

Cheers,
Olivier.

--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 3/4] tools: add tablet image viewer

2012-11-07 Thread Peter Hutterer
On Wed, Nov 07, 2012 at 09:24:47AM +0100, Olivier Fourdan wrote:
> 
> Hey Peter,
> 
> Olivier Fourdan said the following on 11/07/2012 09:16 AM:
> >>>  All four patches merged, thank you.
> >Thanks!:-)
> 
> Err, I can't find them in git master: 
> http://linuxwacom.git.sourceforge.net/git/gitweb.cgi?p=linuxwacom/libwacom;a=log
> 
> Did you push to a different branch?

whoops. pushed now

   f40ede0..e2fed93  master -> master

Cheers,
  Peter


--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 3/4] tools: add tablet image viewer

2012-11-07 Thread Olivier Fourdan

Hey Peter,

Olivier Fourdan said the following on 11/07/2012 09:16 AM:
>> >  All four patches merged, thank you.
> Thanks!:-)

Err, I can't find them in git master: 
http://linuxwacom.git.sourceforge.net/git/gitweb.cgi?p=linuxwacom/libwacom;a=log

Did you push to a different branch?

Cheers,
Olivier.

--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 3/4] tools: add tablet image viewer

2012-11-07 Thread Olivier Fourdan

Hey Peter,

Peter Hutterer said the following on 11/07/2012 02:34 AM:
> show-svg-image.c: In function ‘on_expose_cb’:
> show-svg-image.c:238:18: warning: variable ‘expose_event’ set but not used
> [-Wunused-but-set-variable]
> looks like one can just drop it, that's what I did here after merging.
>
> All four patches merged, thank you.

Thanks! :-)

> One comment I have is regarding commit messages: the prefix ("lib:", "test:"
> etc) is for guidance and not strictly required. What git somewhat enforces
> though is one line for summary, a blank line, then detailed descriptions.
>
> So looking at patch 4/4 (actual patch, for some reason the email subject
> lines are swapped) you have data: blah and test: blah in the commit message.

Yeah, I do send these by hand and of course that can fail. The 3rd 
patch beign the 4th is just /me copying the wrong subject...

> This isn't necessary, just pick the one where the main change happens
> (usually lib or data, since that is the meat of the repository). Ideally
> there's one logical change (in this case add the data) and various extra
> bits that accompany it (in this case testing)
>
> OTOH, patch 3/4 introduces both an XML validator and a image display tool.
> IMO these should be in two different patches to make tracking these changes
> easier, and they are two, not one, logical changes. I've split them up here
> locally, so no further patch sets required.

Agreed.

> Also, last comment: if the rules above seem arbitrary, they pretty much are,
> sorry:)  The best rule to follow is the "one logical change per patch".

No problem with rules, each project has its rules and when 
contributing to different projects, one has to adapt ;-)

What I usually do is to (try to) do just like what is seen in the past 
log, well, sometimes I either don't get it right, make a mistake or 
look at a wrong place. That happens.

> (I've also added the two new binaries to .gitignore)

Thanks again for merging these patches, that'll definitely help for 
the GNOME OSD window.

Cheers,
Olivier.

--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel