[mutter] pointer: Don't fizzle out surface changes too soon



commit 9203db0655125347040dc3193e7353d1e945e21e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Oct 6 14:31:16 2014 -0700

    pointer: Don't fizzle out surface changes too soon
    
    During a DND grab, pointer->focus_surface is NULL, since the wl_pointer
    doesn't have any focused surface (it's in drag mode). In this case, the
    drag interface has control of the focus, and when dragging into a NULL
    surface, drag_grab_focus won't get called, properly detaching it from
    the previous surface.
    
    Let the interface->focus implementation do the fizzling out.
    
    In the future, we should split out wl_pointer's implementation
    (pointer->focus_surface) from the Wayland side of the generic pointer
    wrapper (pointer->current) and use our event routing system to determine
    or similar whether it should go to wl_pointer or wl_data_device.

 src/wayland/meta-wayland-pointer.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 3fc05ec..a38a35f 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -272,11 +272,8 @@ sync_focus_surface (MetaWaylandPointer *pointer)
       g_assert_not_reached ();
     }
 
-  if (focus_surface != pointer->focus_surface)
-    {
-      const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
-      interface->focus (pointer->grab, focus_surface);
-    }
+  const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
+  interface->focus (pointer->grab, focus_surface);
 }
 
 static void


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