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 736004 - touch support for icon activation
touch support for icon activation
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkEntry
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-09-04 03:40 UTC by Matthias Clasen
Modified: 2014-09-04 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
entry: Handle touch events on entry icons (6.32 KB, patch)
2014-09-04 13:59 UTC, Carlos Garnacho
committed Details | Review

Description Matthias Clasen 2014-09-04 03:40:05 UTC
It has been pointed out that icons in entries only react to button events, not to touch.

https://bugzilla.redhat.com/show_bug.cgi?id=1134908
Comment 1 Carlos Garnacho 2014-09-04 13:59:51 UTC
Created attachment 285380 [details] [review]
entry: Handle touch events on entry icons

Those used to work indirectly due to GtkEntry not setting GDK_TOUCH_MASK,
so pointer emulation would happen on those, but the event handlers on icons
and its icon-pressed/released signals have never been explicitly touch
aware, and this broke since the GDK_TOUCH_MASK can be set indirectly by
GtkGestures.

So make the icon event handler handle touch events, each icon can get hold
of one GdkEventSequence, reacting exclusively to it. This is still not
ported to GtkGesture due to GdkEvent exposure in these icon signals, as
users might expect GDK_2/3BUTTON_PRESS while GtkGesture ignores those.

Also, unset all icon pressed/sequence state on grab-notify, this used to
happen ad-hoc when initiating icon DnD, but that doesn't cut it for
user-defined reasons to initiate a grab (eg. popovers).
Comment 2 Matthias Clasen 2014-09-04 14:22:09 UTC
Review of attachment 285380 [details] [review]:

seems to work ok, thanks !

the active area is really too small for icons to be touch-friendly, but thats a different issue
Comment 3 Carlos Garnacho 2014-09-04 14:44:08 UTC
Attachment 285380 [details] pushed as 9629fd0 - entry: Handle touch events on entry icons