[mutter] wayland: Don't cancel the pointer grab on compositor grabs



commit 8a7876ded5755a1a9a3258a85a743cbbd397fd7e
Author: Jonas Ådahl <jadahl gmail com>
Date:   Thu Oct 13 23:05:39 2016 +0800

    wayland: Don't cancel the pointer grab on compositor grabs
    
    We shouldn't cancel the pointer grab when there is a compositor grab,
    since that'd break things like drag-n-drop via the overview and
    alt-tabs.
    
    The original reason for cancelling the pointer grab on compositor grabs
    was to avoid a re-entry when a compositor grab was activated while
    there was an active pointer constraint grab. The re-entry would happen
    when the compositor grab cleared the pointer focus. Clearing the focus
    would trigger the pointer constraint to be deactivated, which would end
    its grab. Ending the grab would reset the grab to the default one, which
    could focus the same surface again, triggering the constraint to
    re-enable before it finished disabling.
    
    This is now avoided because the default grab handler is now aware of
    compositor grabs, and won't override the cleared pointer focus until
    the compositor grab ends.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772914

 src/wayland/meta-wayland-pointer.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 9c5ddd3..986a61c 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -229,8 +229,6 @@ sync_focus_surface (MetaWaylandPointer *pointer)
     case META_EVENT_ROUTE_COMPOSITOR_GRAB:
     case META_EVENT_ROUTE_FRAME_BUTTON:
       /* The compositor has a grab, so remove our focus... */
-      meta_wayland_pointer_cancel_grab (pointer);
-      meta_wayland_pointer_reset_grab (pointer);
       meta_wayland_pointer_set_focus (pointer, NULL);
       break;
 


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