[mutter] display: Remove COMPOSITOR from mouse/keyboard grab ops



commit 258112d6a733d4d2bf80a316749829c76cbe3f98
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Apr 20 11:04:43 2014 -0400

    display: Remove COMPOSITOR from mouse/keyboard grab ops
    
    Looking at the code paths where is_mouse / is_keyboard are used,
    all of them should never be run when dealing with a COMPOSITOR
    grab op, since they're filtered out above or the method is just
    never run during that time.
    
    It's confusing that COMPOSITOR is in here, and requires us to
    be funny with other places in code, so just take it out.

 src/core/display.c                 |    2 --
 src/wayland/meta-wayland-pointer.c |    3 +--
 2 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index bdf5a15..62c63e9 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1193,7 +1193,6 @@ meta_grab_op_is_mouse (MetaGrabOp op)
     case META_GRAB_OP_KEYBOARD_RESIZING_SW:
     case META_GRAB_OP_KEYBOARD_RESIZING_NW:
     case META_GRAB_OP_KEYBOARD_MOVING:
-    case META_GRAB_OP_COMPOSITOR:
       return TRUE;
 
     default:
@@ -1216,7 +1215,6 @@ meta_grab_op_is_keyboard (MetaGrabOp op)
     case META_GRAB_OP_KEYBOARD_RESIZING_NE:
     case META_GRAB_OP_KEYBOARD_RESIZING_SW:
     case META_GRAB_OP_KEYBOARD_RESIZING_NW:
-    case META_GRAB_OP_COMPOSITOR:
       return TRUE;
 
     default:
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index e75be27..09f803d 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -370,8 +370,7 @@ sync_focus_surface (MetaWaylandPointer *pointer)
   MetaWaylandSurface *focus_surface;
 
   /* Don't update the focus surface while we have a special grab. */
-  if (meta_grab_op_is_mouse (display->grab_op) &&
-      display->grab_op != META_GRAB_OP_COMPOSITOR)
+  if (meta_grab_op_is_mouse (display->grab_op))
     return;
 
   focus_surface = get_focus_surface (pointer);


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