[Wayland-bugs] [Bug 750845] popup windows don't get touch events

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Fri Jun 19 07:56:50 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=750845

--- Comment #4 from Carlos Garnacho <carlosg at gnome.org> ---
The patch might not be too off. This problem comes from the difference in
behavior between X11 and wayland wrt the "pointer emulating" touch.

On X11, the first touch onscreen takes over the master pointer, and that touch
has a flag set that gets translated in GDK into
gdk_event_set_pointer_emulated(ev,TRUE). In the higher layers GtkGestures do
rely on this for "single touch" gestures, so no multiple fingers can trigger
single touch gestures in different places.

On Wayland, this is emulated somewhat on the first touch the client is aware
of. Otherwise, these gestures would stay deaf to any touch (and so would most
widgets).

But, internally in GDK, some assumptions are done with the pointer position
with those "pointer emulating" touches, it ends up trying to look the window
the pointer is over, and finds out it's actually not over the window, so the
events are ignored.

In order to fix this, I'd say we have two paths:

- Going further forward in the "pointer emulating" approach, which involves
sending fake crossing events, selectively silencing the pointer if there is a
pointer emulating touch around, fixing device queries to return
coordinates/windows relative to the touch if there's one around, etc...

- Admitting "pointer emulating" is not something that can be honored outside of
X11, adding an extra "first touch" flag that gestures can listen to, and avoid
setting the "pointer emulating" flag on Wayland, so touch-aware paths are used
within GDK.

I guess #2 is better for the longer term, it won't help much though for widgets
that only have pointer events mask/handlers though.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150619/69a8dc2f/attachment.html>


More information about the wayland-bugs mailing list