From 236417be38ff2176ba78c1263d7310dbc253d10e Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Thu, 27 Oct 2016 14:35:45 +0200 Subject: [PATCH] compositor: End a wayland popup grab when starting a compositor grab Wayland popup grabs, unlike other grab types, can be safely cancelled so there's no reason to deny compositor grab requests if a wayland popup is on. In particular, this allows entering the overview via a keybinding or locking the screen while a wayland popup has a grab which is something that's been advertised as a wayland improvement over X. https://bugzilla.gnome.org/show_bug.cgi?id=771235 --- src/compositor/compositor.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index 59ad7f77e..f001dfd16 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -352,6 +352,14 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor, */ MetaDisplay *display = compositor->display; +#ifdef HAVE_WAYLAND + if (display->grab_op == META_GRAB_OP_WAYLAND_POPUP) + { + MetaWaylandSeat *seat = meta_wayland_compositor_get_default ()->seat; + meta_wayland_pointer_end_popup_grab (seat->pointer); + } +#endif + if (is_modal (display) || display->grab_op != META_GRAB_OP_NONE) return FALSE;