From 756a412436742a24588804be4ca3b6b54ad2900f Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 18 Feb 2014 18:06:55 -0500 Subject: [PATCH] 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 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index f5f6cdf5f..d01507f54 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)