diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2015-10-09 16:42:06 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2015-10-17 18:52:52 +0200 |
commit | a5d2555196758d530a563bcabec5457b1bfed375 (patch) | |
tree | c834fc12e108727d7e908d63f383100347e91797 /src/wayland/meta-wayland-keyboard.c | |
parent | dd5a4ecdf93f0bf03819416618ab15430b2b7e56 (diff) | |
download | mutter-a5d2555196758d530a563bcabec5457b1bfed375.tar.gz |
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.
https://bugzilla.gnome.org/show_bug.cgi?id=756296
Diffstat (limited to 'src/wayland/meta-wayland-keyboard.c')
-rw-r--r-- | src/wayland/meta-wayland-keyboard.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c index 7cc485360..9620705fe 100644 --- a/src/wayland/meta-wayland-keyboard.c +++ b/src/wayland/meta-wayland-keyboard.c @@ -673,3 +673,10 @@ meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard, wl_list_insert (&keyboard->resource_list, wl_resource_get_link (cr)); } } + +gboolean +meta_wayland_keyboard_can_popup (MetaWaylandKeyboard *keyboard, + uint32_t serial) +{ + return keyboard->key_serial == serial; +} |