[mutter/wayland] pointer: Make nested grabs work



commit 756a412436742a24588804be4ca3b6b54ad2900f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Feb 18 18:06:55 2014 -0500

    pointer: Make nested grabs work
    
    Something noticed on code inspection. If we have a popup grab,
    it will always return FALSE. The code here clearly meant to continue
    if we had an existing popup grab from an existing client.

 src/wayland/meta-wayland-pointer.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index f5f6cdf..d01507f 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -589,15 +589,13 @@ meta_wayland_pointer_start_popup_grab (MetaWaylandPointer *pointer,
 
   if (pointer->grab != &pointer->default_grab)
     {
-      if (pointer->grab->interface == &popup_grab_interface)
-        {
-          grab = (MetaWaylandPopupGrab*)pointer->grab;
+      if (pointer->grab->interface != &popup_grab_interface)
+        return FALSE;
 
-          if (wl_resource_get_client (surface->resource) != grab->grab_client)
-            return FALSE;
-        }
+      grab = (MetaWaylandPopupGrab*)pointer->grab;
 
-      return FALSE;
+      if (wl_resource_get_client (surface->resource) != grab->grab_client)
+        return FALSE;
     }
 
   if (pointer->grab == &pointer->default_grab)


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