From 020f209c458e42840912e618792118c0ee29fc17 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Fri, 18 Apr 2014 18:54:35 -0400 Subject: [PATCH] pointer: Split out the code that gets the proper focus surface as well --- src/wayland/meta-wayland-pointer.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 0b84a09f9..e9f0c2448 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -352,16 +352,21 @@ count_buttons (const ClutterEvent *event) return count; } -static void -sync_focus_surface (MetaWaylandPointer *pointer) +static MetaWaylandSurface * +get_focus_surface (MetaWaylandPointer *pointer) { - MetaWaylandSurface *focus_surface; MetaDisplay *display = meta_get_display (); if (meta_grab_op_should_block_wayland (display->grab_op)) - focus_surface = NULL; - else - focus_surface = pointer->current; + return NULL; + + return pointer->current; +} + +static void +sync_focus_surface (MetaWaylandPointer *pointer) +{ + MetaWaylandSurface *focus_surface = get_focus_surface (pointer); if (focus_surface != pointer->focus_surface) {