1
0
Fork 0

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
This commit is contained in:
Rui Matos 2016-10-27 14:35:45 +02:00
parent 2641b364e8
commit 236417be38

View file

@ -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;