On Wed, Sep 19, 2012 at 03:08:00PM +0200, Timo Kluck wrote: > Hi, > > I am the owner of a HP touchsmart tm2, which comes with a wacom stylus > + touchscreen with usb id 056a:00e3. > > I noted that gnome-settings-daemon maps my stylus perfectly to my > laptop screen, even when rotating or when I have an external monitor > attached. The same thing does not work for the touchscreen. > > I've traced this to a single line of code in libwacom. The > "works-for-me" patch is attached. Of course, I don't know what this > will do for other devices. > > I'm also including a udev desciption of my wacom device for reference. > > I'm looking forward to your feedback! > Timo Kluck
> tkluck@notebook-tjk:~/src/libwacom$ udevadm info --query=all > --name=/dev/input/event7 > P: /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input7/event7 > N: input/event7 > E: DEVNAME=/dev/input/event7 > E: > DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input7/event7 > E: DMI_VENDOR=Hewlett-Packard > E: ID_INPUT=1 > E: ID_INPUT_KEY=1 > E: ID_PATH=acpi-LNXVIDEO:00 > E: ID_PATH_TAG=acpi-LNXVIDEO_00 > E: MAJOR=13 > E: MINOR=71 > E: SUBSYSTEM=input > E: UDEV_LOG=3 > E: USEC_INITIALIZED=3369839 > E: XKBLAYOUT=us > E: XKBMODEL=pc105 > E: XKBVARIANT=altgr-intl > > tkluck@notebook-tjk:~/src/libwacom$ udevadm info --query=all > --name=/dev/input/event8 > P: > /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:09/LNXVIDEO:01/input/input8/event8 > N: input/event8 > E: DEVNAME=/dev/input/event8 > E: > DEVPATH=/devices/LNXSYSTM:00/device:00/PNP0A08:00/device:09/LNXVIDEO:01/input/input8/event8 > E: DMI_VENDOR=Hewlett-Packard > E: ID_INPUT=1 > E: ID_INPUT_KEY=1 > E: ID_PATH=acpi-LNXVIDEO:01 > E: ID_PATH_TAG=acpi-LNXVIDEO_01 > E: MAJOR=13 > E: MINOR=72 > E: SUBSYSTEM=input > E: UDEV_LOG=3 > E: USEC_INITIALIZED=3371351 > E: XKBLAYOUT=us > E: XKBMODEL=pc105 > E: XKBVARIANT=altgr-intl unfortunately, the important bits are missing here. the code here (after your patch) checks of ID_INPUT_TOUCHPAD on the parent as well. i can only assume that's set in your case but you're missing that bit from the output here. > From 4d67c0b2af046c952312ab923fbc47487322c59a Mon Sep 17 00:00:00 2001 > From: Timo Kluck <tkl...@infty.nl> > Date: Wed, 19 Sep 2012 14:50:02 +0200 > Subject: [PATCH] accept ID_INPUT_TOUCHSCREEN as a wacom device > > --- > libwacom/libwacom.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c > index fe850a2..c54ef4a 100644 > --- a/libwacom/libwacom.c > +++ b/libwacom/libwacom.c > @@ -44,7 +44,8 @@ static gboolean > is_tablet_or_touchpad (GUdevDevice *device) > { > return g_udev_device_get_property_as_boolean (device, > "ID_INPUT_TABLET") || > - g_udev_device_get_property_as_boolean (device, > "ID_INPUT_TOUCHPAD"); > + g_udev_device_get_property_as_boolean (device, > "ID_INPUT_TOUCHPAD") || > + g_udev_device_get_property_as_boolean (device, > "ID_INPUT_TOUCHSCREEN"); > } > > /* Overriding SUBSYSTEM isn't allowed in udev (works sometimes, but not > -- > 1.7.10.4 note that the function name doesn't reflect what the function does anymore, this would need to be amended. The patch has a larger implication though. with the patch, libwacom will now attempt to match any touchscreen, but it'll be missing the vast majority of touchscreens out there. So the user gets a generic device only. And given that libwacom is largely focused on tablets, the generic device won't really look like the touchscreen we really have. do we really want to claim to support all touchscreens? Cheers, Peter ------------------------------------------------------------------------------ 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