[Linuxwacom-devel] [PATCH 0/2] add Integrated feature for ISD

2012-10-08 Thread Olivier Fourdan
As discussed on linuxwacom-devel mailing list, add a new Integrated 
feature
for integrated system devices to identify eg. Tablet PC.

Olivier Fourdan (2):
   lib: add Integrated feature
   data: add the Integrated field to ISD definitions

  data/isdv4-90.tablet |1 +
  data/isdv4-93.tablet |1 +
  data/isdv4-e3.tablet |1 +
  data/isdv4-e6.tablet |1 +
  data/isdv4-ed.tablet |1 +
  data/isdv4-ef.tablet |1 +
  data/n-trig-pen.tablet   |1 +
  data/serial-wacf004.tablet   |1 +
  data/wacom.example   |4 
  libwacom/libwacom-database.c |3 +++
  libwacom/libwacom.c  |6 ++
  libwacom/libwacom.h  |   11 +--
  libwacom/libwacomint.h   |3 ++-
  13 files changed, 32 insertions(+), 3 deletions(-)


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] [PATCH 1/2] lib: add Integrated feature

2012-10-08 Thread Olivier Fourdan


From 641d75994eaf4d98af0ebf50255edd4e482536b2 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan ofour...@redhat.com
Date: Mon, 8 Oct 2012 16:00:41 +0200
Subject: [PATCH 1/2] lib: add Integrated feature

to describe ISD, integrated system devices.

Not to be confused with BuiltIn which denotes screen tablets
(description of libwacom_is_builtin() API is updated to avoid
potential confusion)
---
 libwacom/libwacom-database.c |3 +++
 libwacom/libwacom.c  |6 ++
 libwacom/libwacom.h  |   11 +--
 libwacom/libwacomint.h   |3 ++-
 4 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
index d39305d..9699054 100644
--- a/libwacom/libwacom-database.c
+++ b/libwacom/libwacom-database.c
@@ -405,6 +405,9 @@ libwacom_parse_tablet_keyfile(const char *path)
 	if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, Reversible, NULL))
 		device-features |= FEATURE_REVERSIBLE;
 
+	if (g_key_file_get_boolean(keyfile, FEATURES_GROUP, Integrated, NULL))
+		device-features |= FEATURE_INTEGRATED;
+
 	if (device-features  FEATURE_BUILTIN 
 	device-features  FEATURE_REVERSIBLE)
 		g_warning (Tablet '%s' is both reversible and builtin. This is impossible, libwacom_get_match(device));
diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index 4f8c5f9..b384560 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -643,6 +643,7 @@ libwacom_print_device_description(int fd, WacomDevice *device)
 
 	dprintf(fd, [Features]\n);
 	dprintf(fd, Reversible=%s\n, libwacom_is_reversible(device)	? true : false);
+	dprintf(fd, Integrated=%s\n,	 libwacom_is_integrated(device)	? true : false);
 	dprintf(fd, Stylus=%s\n,	 libwacom_has_stylus(device)	? true : false);
 	dprintf(fd, Ring=%s\n,	 libwacom_has_ring(device)	? true : false);
 	dprintf(fd, Ring2=%s\n,	 libwacom_has_ring2(device)	? true : false);
@@ -866,6 +867,11 @@ int libwacom_is_reversible(WacomDevice *device)
 	return !!(device-features  FEATURE_REVERSIBLE);
 }
 
+int libwacom_is_integrated(WacomDevice *device)
+{
+	return !!(device-features  FEATURE_INTEGRATED);
+}
+
 WacomBusType libwacom_get_bustype(WacomDevice *device)
 {
 	g_return_val_if_fail(device-match = 0, -1);
diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h
index 8830db8..370fc10 100644
--- a/libwacom/libwacom.h
+++ b/libwacom/libwacom.h
@@ -456,8 +456,8 @@ int libwacom_get_button_led_group (WacomDevice *device,
 
 /**
  * @param device The tablet to query
- * @return non-zero if the device is built-in or zero if the device is an
- * external tablet
+ * @return non-zero if the device is built into the screen (ie a screen tablet)
+ * or zero if the device is an external tablet
  */
 int libwacom_is_builtin(WacomDevice *device);
 
@@ -470,6 +470,13 @@ int libwacom_is_reversible(WacomDevice *device);
 
 /**
  * @param device The tablet to query
+ * @return non-zero if the device is an integrated system device (ISD) or zero
+ * if the device is a regular tablet
+ */
+int libwacom_is_integrated(WacomDevice *device);
+
+/**
+ * @param device The tablet to query
  * @return The bustype of this device.
  */
 WacomBusType libwacom_get_bustype(WacomDevice *device);
diff --git a/libwacom/libwacomint.h b/libwacom/libwacomint.h
index 55436e9..e30d047 100644
--- a/libwacom/libwacomint.h
+++ b/libwacom/libwacomint.h
@@ -52,7 +52,8 @@ enum WacomFeature {
 	FEATURE_RING		= (1  2),
 	FEATURE_RING2		= (1  3),
 	FEATURE_BUILTIN		= (1  4),
-	FEATURE_REVERSIBLE	= (1  5)
+	FEATURE_REVERSIBLE	= (1  5),
+	FEATURE_INTEGRATED  = (1  6)
 };
 
 /* WARNING: When adding new members to this struct
-- 
1.7.1

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


[Linuxwacom-devel] [PATCH 2/2] data: add the Integrated field to ISD definitions

2012-10-08 Thread Olivier Fourdan


From 2be9520936f4681043d937097ea17597fe3555dc Mon Sep 17 00:00:00 2001
From: Olivier Fourdan ofour...@redhat.com
Date: Mon, 8 Oct 2012 16:02:39 +0200
Subject: [PATCH 2/2] data: add the Integrated field to ISD definitions

ISD stands for Integrated System Devices.
---
 data/isdv4-90.tablet   |1 +
 data/isdv4-93.tablet   |1 +
 data/isdv4-e3.tablet   |1 +
 data/isdv4-e6.tablet   |1 +
 data/isdv4-ed.tablet   |1 +
 data/isdv4-ef.tablet   |1 +
 data/n-trig-pen.tablet |1 +
 data/serial-wacf004.tablet |1 +
 data/wacom.example |4 
 9 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/data/isdv4-90.tablet b/data/isdv4-90.tablet
index c92c333..d164494 100644
--- a/data/isdv4-90.tablet
+++ b/data/isdv4-90.tablet
@@ -16,3 +16,4 @@ Stylus=true
 Touch=false
 Buttons=0
 BuiltIn=true
+Integrated=true
diff --git a/data/isdv4-93.tablet b/data/isdv4-93.tablet
index c6ab4b5..7d9fc83 100644
--- a/data/isdv4-93.tablet
+++ b/data/isdv4-93.tablet
@@ -16,3 +16,4 @@ Stylus=true
 Touch=true
 Buttons=0
 BuiltIn=true
+Integrated=true
diff --git a/data/isdv4-e3.tablet b/data/isdv4-e3.tablet
index 6e68cb4..4eed448 100644
--- a/data/isdv4-e3.tablet
+++ b/data/isdv4-e3.tablet
@@ -10,3 +10,4 @@ Stylus=true
 Touch=true
 BuiltIn=true
 Buttons=0
+Integrated=true
diff --git a/data/isdv4-e6.tablet b/data/isdv4-e6.tablet
index 328a702..a3ab27c 100644
--- a/data/isdv4-e6.tablet
+++ b/data/isdv4-e6.tablet
@@ -12,3 +12,4 @@ Stylus=true
 Touch=true
 BuiltIn=true
 Buttons=0
+Integrated=true
diff --git a/data/isdv4-ed.tablet b/data/isdv4-ed.tablet
index cee499b..58c2a44 100644
--- a/data/isdv4-ed.tablet
+++ b/data/isdv4-ed.tablet
@@ -10,3 +10,4 @@ Stylus=true
 Touch=true
 BuiltIn=true
 Buttons=0
+Integrated=true
diff --git a/data/isdv4-ef.tablet b/data/isdv4-ef.tablet
index 6f8816f..9a5ff90 100644
--- a/data/isdv4-ef.tablet
+++ b/data/isdv4-ef.tablet
@@ -9,3 +9,4 @@ Class=ISDV4
 Stylus=true
 BuiltIn=true
 Buttons=0
+Integrated=true
diff --git a/data/n-trig-pen.tablet b/data/n-trig-pen.tablet
index 5297228..bcb94b4 100644
--- a/data/n-trig-pen.tablet
+++ b/data/n-trig-pen.tablet
@@ -17,3 +17,4 @@ Stylus=true
 Touch=true
 Buttons=0
 BuiltIn=true
+Integrated=true
diff --git a/data/serial-wacf004.tablet b/data/serial-wacf004.tablet
index d1ba472..8023f04 100644
--- a/data/serial-wacf004.tablet
+++ b/data/serial-wacf004.tablet
@@ -8,3 +8,4 @@ Stylus=true
 Ring=false
 Buttons=0
 BuiltIn=true
+Integrated=true
diff --git a/data/wacom.example b/data/wacom.example
index 762c360..091e7e1 100644
--- a/data/wacom.example
+++ b/data/wacom.example
@@ -104,6 +104,10 @@ Buttons=9
 # value comes from kernel properties
 BuiltIn=false
 
+# Integrated System Device, is the tablet is part of a device such as a
+# TabletPC
+Integrated=false
+
 # Metadata about the buttons on the tablet
 # Buttons are numbered using upper-case letters
 [Buttons]
-- 
1.7.1

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add Integrated feature for ISD

2012-10-08 Thread Bastien Nocera
On Mon, 2012-10-08 at 17:39 +0200, Olivier Fourdan wrote:
 As discussed on linuxwacom-devel mailing list, add a new Integrated 
 feature
 for integrated system devices to identify eg. Tablet PC.
 
 Olivier Fourdan (2):
lib: add Integrated feature
data: add the Integrated field to ISD definitions

Can't we find a better name than this? It means nothing unless you've
been working on Wacom tablets for a long while...


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add Integrated feature for ISD

2012-10-08 Thread Olivier Fourdan
Hi Bastien,

Bastien Nocera said the following on 10/08/2012 06:06 PM:
 On Mon, 2012-10-08 at 17:39 +0200, Olivier Fourdan wrote:
 As discussed on linuxwacom-devel mailing list, add a new Integrated
 feature
 for integrated system devices to identify eg. Tablet PC.

 Olivier Fourdan (2):
 lib: add Integrated feature
 data: add the Integrated field to ISD definitions
 Can't we find a better name than this? It means nothing unless you've
 been working on Wacom tablets for a long while...

TabletPC was suggested, or ISD (but I find the later even more 
cryptic).

I did not choose TabletPC because I wasn't sure if all integrated 
device would be TabletPC.

But if TabletPC is preferable, I have no problem changing the names to 
that.

Cheers,
Olivier.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add Integrated feature for ISD

2012-10-08 Thread Bastien Nocera
On Mon, 2012-10-08 at 18:12 +0200, Olivier Fourdan wrote:
 Hi Bastien,
 
 Bastien Nocera said the following on 10/08/2012 06:06 PM:
  On Mon, 2012-10-08 at 17:39 +0200, Olivier Fourdan wrote:
  As discussed on linuxwacom-devel mailing list, add a new Integrated
  feature
  for integrated system devices to identify eg. Tablet PC.
 
  Olivier Fourdan (2):
  lib: add Integrated feature
  data: add the Integrated field to ISD definitions
  Can't we find a better name than this? It means nothing unless you've
  been working on Wacom tablets for a long while...
 
 TabletPC was suggested, or ISD (but I find the later even more 
 cryptic).
 
 I did not choose TabletPC because I wasn't sure if all integrated 
 device would be TabletPC.
 
 But if TabletPC is preferable, I have no problem changing the names to 
 that.

Looks to me like builtin is tablet is integrated with the display
and ISD is tablet is integrated with the computer.

I'm sure we could deprecate the _is_builtin() function, and use a
bitmask for this support instead?

LIBWACOM_DEVICE_INTEGRATED_WITH_NONE = 0,
LIBWACOM_DEVICE_INTEGRATED_WITH_DISPLAY = 1  0,
LIBWACOM_DEVICE_INTEGRATED_WITH_COMPUTER = 1  2


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add Integrated feature for ISD

2012-10-08 Thread Favux ...
IntegratedLCD?  Short for digitizer sandwiched with LCD.  Better than
DisplayMounted I think.  Sandwiched, Fused, Combined are also not
descriptive enough.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/9] Multitouch support patches

2012-10-08 Thread Jason Gerecke
On Tue, Oct 2, 2012 at 6:55 PM, Chris Bagwell ch...@cnpbagwell.com wrote:
 On Sat, Sep 29, 2012 at 6:58 PM, Jason Gerecke killert...@gmail.com wrote:
 This set of patches adds multitouch support to the driver. The new
 API made available in XI2.2 is used to report the location of all
 contacts, allowing applications to work with the touch points themselves.
 This is added as a new gesture mode, taking over whenever in-driver
 gestures have been disabled and at least two fingers have come into
 contact.

 The best way I've found to test this code at the moment is with a
 gesture recognizer called Touchegg. It should be in the repositories
 for Ubuntu 11.10 (and will need compiling from source for 12.04),
 has RPMs that can located through Google, and has a PKGBUILD available
 for Arch in the AUR.

 This changes how data from the kernel is read into the channels for
 tracking. It has the potential to introduce problems for tablets
 that don't have touch, and I'd appreciate any Tested-By tags I can
 get (especially on Protocol 4 [Bamboo] and Generic Protocol devices).


 If my line-by-line review does come before much longer, feel free to
 take this and commit:

 Tested-by: Chris Bagwell ch...@cnpbagwell.com

 I agree with direction your going with patches.  Its in line with how
 I was planning on adding in if I got around to it.

 Chris

All nine patches have been merged.

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.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH] Fix prerequisite check in wcmUpdateSerial

2012-10-08 Thread Jason Gerecke
On Tue, Oct 2, 2012 at 4:35 PM, Ping Cheng pingli...@gmail.com wrote:
 On Tue, Oct 2, 2012 at 2:53 PM, Jason Gerecke killert...@gmail.com wrote:
 The prerequisite check in wcmUpdateSerial is incorrect. If the tool ID
 changes, the property reflecting it will not be updated unless/until the
 serial number also changes. The check is updated to reflect this.

 Additionally, the prerequesite check at one of its callsites is removed
 since the function performs the same check internally.

 https://bugs.freedesktop.org/show_bug.cgi?id=45237

 Signed-off-by: Jason Gerecke killert...@gmail.com

 Nice catch! Thank you.

 Reviewed-by: Ping Cheng pi...@wacom.com.

 Ping

 ---
  src/wcmCommon.c   | 3 +--
  src/wcmXCommand.c | 2 +-
  2 files changed, 2 insertions(+), 3 deletions(-)

 diff --git a/src/wcmCommon.c b/src/wcmCommon.c
 index cb76d5a..73bdacf 100644
 --- a/src/wcmCommon.c
 +++ b/src/wcmCommon.c
 @@ -694,8 +694,7 @@ void wcmSendEvents(InputInfoPtr pInfo, const 
 WacomDeviceState* ds)
 return;
 }

 -   if (priv-cur_serial != serial || priv-cur_device_id != id)
 -   wcmUpdateSerial(pInfo, serial, id);
 +   wcmUpdateSerial(pInfo, serial, id);

 /* don't move the cursor when going out-prox */
 if (!ds-proximity)
 diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
 index c3a2a7c..d53df08 100644
 --- a/src/wcmXCommand.c
 +++ b/src/wcmXCommand.c
 @@ -925,7 +925,7 @@ wcmUpdateSerial(InputInfoPtr pInfo, unsigned int serial, 
 int id)
  {
 WacomDevicePtr priv = pInfo-private;

 -   if (priv-cur_serial == serial)
 +   if (priv-cur_serial == serial  priv-cur_device_id == id)
 return;

 priv-cur_serial = serial;
 --
 1.7.12.2


 --
 Don't let slow site performance ruin your business. Deploy New Relic APM
 Deploy New Relic app performance management and know exactly
 what is happening inside your Ruby, Python, PHP, Java, and .NET app
 Try New Relic at no cost today and get our sweet Data Nerd shirt too!
 http://p.sf.net/sfu/newrelic-dev2dev
 ___
 Linuxwacom-devel mailing list
 Linuxwacom-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Patch merged.

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.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel