[mutter] compositor: End a wayland popup grab when starting a compositor grab



commit 236417be38ff2176ba78c1263d7310dbc253d10e
Author: Rui Matos <tiagomatos gmail com>
Date:   Thu Oct 27 14:35:45 2016 +0200

    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 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 59ad7f7..f001dfd 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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]