From 3f375c942677ee5e56128c971c24f0b76c262d7e Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 20 Apr 2014 11:08:09 -0400 Subject: [PATCH] pointer: Remove get_focus_surface Yeah, I was wrong, it doesn't improve code clarity. --- src/wayland/meta-wayland-pointer.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 09f803db9..ca7786587 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -352,17 +352,6 @@ count_buttons (const ClutterEvent *event) return count; } -static MetaWaylandSurface * -get_focus_surface (MetaWaylandPointer *pointer) -{ - MetaDisplay *display = meta_get_display (); - - if (meta_grab_op_should_block_wayland (display->grab_op)) - return NULL; - - return pointer->current; -} - static void sync_focus_surface (MetaWaylandPointer *pointer) { @@ -373,7 +362,10 @@ sync_focus_surface (MetaWaylandPointer *pointer) if (meta_grab_op_is_mouse (display->grab_op)) return; - focus_surface = get_focus_surface (pointer); + if (meta_grab_op_should_block_wayland (display->grab_op)) + focus_surface = NULL; + else + focus_surface = pointer->current; if (focus_surface != pointer->focus_surface) {