From 258112d6a733d4d2bf80a316749829c76cbe3f98 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 20 Apr 2014 11:04:43 -0400 Subject: [PATCH] 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 insertion(+), 4 deletions(-) diff --git a/src/core/display.c b/src/core/display.c index bdf5a150c..62c63e9d8 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 e75be27fb..09f803db9 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);