[mutter] wayland: Remove unnecessary COMPOSITOR_GRAB checks



commit fabad0be9ccadd4dcf15d8e9c57a57b644434764
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri May 27 18:51:24 2022 +0200

    wayland: Remove unnecessary COMPOSITOR_GRAB checks
    
    Since the new ClutterGrab API replaced the old plugin-modal hook,
    the event-route is never set to COMPOSITOR_GRAB.
    
    The code in question already checks whether the stage has a grab,
    so we can just remove old checks.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2436>

 src/wayland/meta-wayland-pointer.c     | 2 --
 src/wayland/meta-wayland-tablet-tool.c | 1 -
 2 files changed, 3 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 3b8b104115..81a16fe6ef 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -281,7 +281,6 @@ sync_focus_surface (MetaWaylandPointer *pointer)
   switch (display->event_route)
     {
     case META_EVENT_ROUTE_WINDOW_OP:
-    case META_EVENT_ROUTE_COMPOSITOR_GRAB:
     case META_EVENT_ROUTE_FRAME_BUTTON:
       /* The compositor has a grab, so remove our focus... */
       meta_wayland_pointer_set_focus (pointer, NULL);
@@ -461,7 +460,6 @@ default_grab_focus (MetaWaylandPointerGrab *grab,
   switch (display->event_route)
     {
     case META_EVENT_ROUTE_WINDOW_OP:
-    case META_EVENT_ROUTE_COMPOSITOR_GRAB:
     case META_EVENT_ROUTE_FRAME_BUTTON:
       return;
       break;
diff --git a/src/wayland/meta-wayland-tablet-tool.c b/src/wayland/meta-wayland-tablet-tool.c
index 8f4ebe82f9..27d31a5b2b 100644
--- a/src/wayland/meta-wayland-tablet-tool.c
+++ b/src/wayland/meta-wayland-tablet-tool.c
@@ -565,7 +565,6 @@ sync_focus_surface (MetaWaylandTabletTool *tool,
   switch (display->event_route)
     {
     case META_EVENT_ROUTE_WINDOW_OP:
-    case META_EVENT_ROUTE_COMPOSITOR_GRAB:
     case META_EVENT_ROUTE_FRAME_BUTTON:
       /* The compositor has a grab, so remove our focus */
       meta_wayland_tablet_tool_set_focus (tool, NULL, event);


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