[mutter/wip/carlosg/grabs-pt3: 23/23] core: Drop META_GRAB_OP_COMPOSITOR




commit 1812ff5233d42face9360faad5fb56f22b937f7f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Nov 23 13:01:09 2021 +0100

    core: Drop META_GRAB_OP_COMPOSITOR
    
    There is no longer meta_plugin_begin_modal(), so this grab operation
    is no longer used.

 src/core/display.c | 8 +-------
 src/meta/common.h  | 4 ----
 src/ui/frames.c    | 6 +-----
 3 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index bb3918cf3a..f6abef9cda 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1795,10 +1795,6 @@ get_event_route_from_grab_op (MetaGrabOp op)
     case META_GRAB_OP_WINDOW_BASE:
       return META_EVENT_ROUTE_WINDOW_OP;
 
-    case META_GRAB_OP_COMPOSITOR:
-      /* begin_grab_op shouldn't be called with META_GRAB_OP_COMPOSITOR. */
-      g_assert_not_reached ();
-
     case META_GRAB_OP_WAYLAND_POPUP:
       return META_EVENT_ROUTE_WAYLAND_POPUP;
 
@@ -2031,9 +2027,7 @@ meta_display_end_grab_op (MetaDisplay *display,
  * Gets the current grab operation, if any.
  *
  * Return value: the current grab operation, or %META_GRAB_OP_NONE if
- * Mutter doesn't currently have a grab. %META_GRAB_OP_COMPOSITOR will
- * be returned if a compositor-plugin modal operation is in effect
- * (See mutter_begin_modal_for_plugin())
+ * Mutter doesn't currently have a grab.
  */
 MetaGrabOp
 meta_display_get_grab_op (MetaDisplay *display)
diff --git a/src/meta/common.h b/src/meta/common.h
index ab93080499..2c516a70d4 100644
--- a/src/meta/common.h
+++ b/src/meta/common.h
@@ -109,7 +109,6 @@ typedef enum
  * @META_GRAB_OP_KEYBOARD_RESIZING_NE: Resizing NE with keyboard
  * @META_GRAB_OP_KEYBOARD_RESIZING_SW: Resizing SW with keyboard
  * @META_GRAB_OP_KEYBOARD_RESIZING_NW: Resizing NS with keyboard
- * @META_GRAB_OP_COMPOSITOR: Compositor asked for grab
  */
 
 /* The lower 16 bits of the grab operation is its type.
@@ -154,9 +153,6 @@ typedef enum
   /* Window grab ops. */
   META_GRAB_OP_WINDOW_BASE,
 
-  /* Special grab op when the compositor asked for a grab */
-  META_GRAB_OP_COMPOSITOR,
-
   /* For when a Wayland client takes a popup grab. */
   META_GRAB_OP_WAYLAND_POPUP,
 
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 0213395f64..b1329b272e 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -1643,15 +1643,11 @@ static gboolean
 handle_leave_notify_event (MetaUIFrame *frame,
                            ClutterCrossingEvent *event)
 {
-  MetaGrabOp grab_op;
-
-  grab_op = meta_x11_wm_get_grab_op (frame->frames->x11_display);
-
   /* ignore the first LeaveNotify event after opening a window menu
    * if it is the result of a compositor grab
    */
   frame->maybe_ignore_leave_notify = frame->maybe_ignore_leave_notify &&
-                                     grab_op == META_GRAB_OP_COMPOSITOR;
+    (event->flags & CLUTTER_EVENT_FLAG_GRAB_NOTIFY) != 0;
 
   if (frame->maybe_ignore_leave_notify)
     return FALSE;


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