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 756296 - Only pointer serials are compared when popping up a window
Only pointer serials are compared when popping up a window
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-10-09 15:05 UTC by Carlos Garnacho
Modified: 2015-10-17 16:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Store key press/release serials on MetaWaylandKeyboard (1.64 KB, patch)
2015-10-09 15:09 UTC, Carlos Garnacho
committed Details | Review
wayland: Make it possible to trigger popups through pointer/keyboard/touch (5.80 KB, patch)
2015-10-09 15:09 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2015-10-09 15:05:53 UTC
During wl/xdg_popup being shown mutter calls meta_wayland_pointer_can_popup(), which compares the given serial to the pointer's, and closes early the popup if it doesn't match.

This obviously works fine for pointers, but if a client happens to show the popup with a serial coming from another device (touch, keyboard), the popup will be dismissed early this way.

I'm attaching a couple of patches to abstract this a bit further adding a meta_wayland_seat_can_popup() that's used on these cases.
Comment 1 Carlos Garnacho 2015-10-09 15:09:17 UTC
Created attachment 312962 [details] [review]
wayland: Store key press/release serials on MetaWaylandKeyboard
Comment 2 Carlos Garnacho 2015-10-09 15:09:22 UTC
Created attachment 312963 [details] [review]
wayland: Make it possible to trigger popups through pointer/keyboard/touch

Right now we just check the pointer serial, so the popup will be
immediately dismissed if the client passes a serial corresponding to
another input device.

Abstract this a bit further and add a meta_wayland_seat_can_popup() call
that will check the serial all input devices. This makes it possible to
trigger menus through touch or keyboard devices.
Comment 3 Jonas Ådahl 2015-10-15 08:38:19 UTC
Review of attachment 312962 [details] [review]:

Looks good to me.
Comment 4 Jonas Ådahl 2015-10-15 08:40:01 UTC
Review of attachment 312963 [details] [review]:

This looks good to me too.
Comment 5 Carlos Garnacho 2015-10-17 16:55:43 UTC
Attachment 312962 [details] pushed as dd5a4ec - wayland: Store key press/release serials on MetaWaylandKeyboard
Attachment 312963 [details] pushed as a5d2555 - wayland: Make it possible to trigger popups through pointer/keyboard/touch