[mutter] pointer: Remove get_focus_surface



commit 3f375c942677ee5e56128c971c24f0b76c262d7e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Apr 20 11:08:09 2014 -0400

    pointer: Remove get_focus_surface
    
    Yeah, I was wrong, it doesn't improve code clarity.

 src/wayland/meta-wayland-pointer.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 09f803d..ca77865 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)
     {


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