After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735629 - GTK+ does not recognize gestures from touchpads
GTK+ does not recognize gestures from touchpads
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GdkDevice
3.13.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
Carlos Garnacho
Depends on:
Blocks: 735633
 
 
Reported: 2014-08-28 18:59 UTC by Jason Gerecke
Modified: 2018-01-17 00:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample patch to have the X11 backend synthesize reasonable GdkEvent postions from touchpad touch axes (6.25 KB, patch)
2014-08-28 18:59 UTC, Jason Gerecke
none Details | Review

Description Jason Gerecke 2014-08-28 18:59:54 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.
Comment 1 Camille Bissuel 2015-02-18 08:46:59 UTC
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 !
Comment 2 Matthias Clasen 2015-02-24 01:40:51 UTC
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.