[mutter/gnome-3-36] window: Do not handle ungrabbed events when unmanaging



commit f58d53b7f9ecc611d07d6489b88abd0ba1d729bc
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jan 20 12:22:22 2021 +0100

    window: Do not handle ungrabbed events when unmanaging
    
    Once we are no longer managing a window, we have no business in
    dealing with it anymore, and operations like focusing, raising or
    pinging the window aren't expected to work, and can go horribly
    wrong if we try.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2467
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1676>
    (cherry picked from commit e7b58c23b896c604b71d542b2f477523df60e637)

 src/core/window.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/core/window.c b/src/core/window.c
index 706a2211a7..7a14f8c10d 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8324,6 +8324,9 @@ meta_window_handle_ungrabbed_event (MetaWindow         *window,
   gfloat x, y;
   guint button;
 
+  if (window->unmanaging)
+    return;
+
   if (event->type != CLUTTER_BUTTON_PRESS &&
       event->type != CLUTTER_TOUCH_BEGIN)
     return;


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