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 737297 - [regression] Gtk buttons don't work with touch anymore
[regression] Gtk buttons don't work with touch anymore
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkButton
3.14.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-09-24 22:20 UTC by Jean-François Fortin Tam
Modified: 2014-09-25 19:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
button: Fix ::clicked emission on touchscreens sending pointer events (1.60 KB, patch)
2014-09-25 13:27 UTC, Carlos Garnacho
committed Details | Review

Description Jean-François Fortin Tam 2014-09-24 22:20:02 UTC
With a Thinkpad X201t touchscreen, GtkButton, togglebuttons, switch buttons, checkboxes... can't be clicked with touch, no matter where they are (in a headerbar, toolbar, etc.). The only ones that work are MenuButtons.

This was tested with the iso image linked from the official 3.14 release notes.
Comment 1 Jean-François Fortin Tam 2014-09-24 22:25:53 UTC
Demonstration: http://jeff.ecchi.ca/public/gtk-737297.webm
Comment 2 Matthias Clasen 2014-09-25 03:14:26 UTC
hmm, can't confirm that here; buttons generally seem to work fine with my touchscreen. Stupid question: you verified that those buttons work when clicked with a mouse or touchpad ?
Comment 3 Jean-François Fortin Tam 2014-09-25 03:28:08 UTC
Yes they work with the touchpad. Just not with the finger. The X201t is a wacom screen, if that changes anything.
Comment 4 Carlos Garnacho 2014-09-25 12:33:17 UTC
I can reproduce on my X220T, very funky given the wacom driver sends pointer events by default, even on multitouch touchscreens, so to GTK+ it would be pretty much like a touchpad or mouse. Even more funky that disabling in-driver gesture support (and thus enabling touch events) has a positive effect:

xinput set-int-prop <device id> "Wacom Enable Touch Gesture" 8 0

I'm looking why this happens.
Comment 5 Matthias Clasen 2014-09-25 13:05:05 UTC
Most likely candidate would be touch_release_in_button, I think ?
Comment 6 Carlos Garnacho 2014-09-25 13:27:25 UTC
Created attachment 287080 [details] [review]
button: Fix ::clicked emission on touchscreens sending pointer events

When GtkGestureMultiPress::released happens, in_button should be unset
after emitting GtkButton::released, whose default implementation uses it.
Moreover, in_button should only be unset there for real touch events, not
guaranteed to trigger crossing events, not every pointer/touch events from
touchscreens.
Comment 7 Matthias Clasen 2014-09-25 17:11:06 UTC
Review of attachment 287080 [details] [review]:

Ah, I guess this would have also made my modelbutton touch fix from yesterday unnecessary ?
Comment 8 Carlos Garnacho 2014-09-25 19:20:00 UTC
Uhm, yeah it seems so. It also feels neater like it is now anyway
Comment 9 Carlos Garnacho 2014-09-25 19:27:00 UTC
Attachment 287080 [details] pushed as d17fd81 - button: Fix ::clicked emission on touchscreens sending pointer events