GNOME Bugzilla – Bug 737297
[regression] Gtk buttons don't work with touch anymore
Last modified: 2014-09-25 19:27:04 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.
Demonstration: http://jeff.ecchi.ca/public/gtk-737297.webm
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 ?
Yes they work with the touchpad. Just not with the finger. The X201t is a wacom screen, if that changes anything.
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.
Most likely candidate would be touch_release_in_button, I think ?
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.
Review of attachment 287080 [details] [review]: Ah, I guess this would have also made my modelbutton touch fix from yesterday unnecessary ?
Uhm, yeah it seems so. It also feels neater like it is now anyway
Attachment 287080 [details] pushed as d17fd81 - button: Fix ::clicked emission on touchscreens sending pointer events