GNOME Bugzilla – Bug 735629
GTK+ does not recognize gestures from touchpads
Last modified: 2018-01-17 00:21:26 UTC
Created attachment 284735 [details] [review] Sample patch to have the X11 backend synthesize reasonable GdkEvent postions from touchpad touch axes When using a touchpad to send gestures to GNOME, gestures are not properly recognized. Most applications are non-responsive to gestures, while others (for example, eog) abort due to failed assertions. This problem stems from GTK+ not obtaining finger coordinates from touchpads. The way things are written now, the gesture engine assumes that the touch events contain locations that correspond to the actual on-screen location of each finger. The X11 backend sets the location of each GdkEvent to the event location reported in the XI_Touch{Begin,End,Update} event that the system sent. The location of these evens contains the finger location *only* if the device sending them is an XIDirectDevice (that is, a touchscreen). If the device is a XIDependentDevice (a touchpad), the location of all events simply contains the pointer location. There seem to be two possible solutions to this problem: A) Change the gesture engine to use GDK_AXIS_{X,Y} instead of event locations B) Change the X11 backend to synthesize screen locations for touchpad touches I've attached a patch which takes the latter (and seemingly more straightforward) approach. I'm not sure which solution would be ideal though, especially when there may be semantics to gesture locations and axis values that I'm not aware of... This patch was developed and tested with the xf86-input-wacom with in-driver gestures disabled. The last few releases of the driver has a bug which prevents touchpads from moving the cursor with gestures disabled, but simply moving the mouse to get the pointer over what you want to make a gesture on is a sufficient workaround. Other drivers should work fine for testing, provided you can disable the gestures.
Hi, Is this bug still on the Roadmap for 3.16 ? https://wiki.gnome.org/Projects/GTK+/Roadmap I'm interested in touchpad gesture for drawing, and for now the situation is quite confusing, as explained here : https://forum.kde.org/viewtopic.php?f=139&t=122211&p=329720#p328284 Thanks for your work !
I think this may have to work for the libinput gesture support to settle before we can figure out what events GTK+ will need to handle here.