[mutter] Protect against stray calls to meta_display_end_grab_op()



commit ae7aabd5de134c48ec8cad9ecb15b06f57b16fa1
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Oct 6 21:10:13 2015 -0400

    Protect against stray calls to meta_display_end_grab_op()
    
    If end_grab_op() is called when there's a "compositor grab"
    rather than a grab op is in effect, silently return.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745785

 src/core/display.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index a7bf0cd..dbfbc68 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1963,9 +1963,12 @@ meta_display_end_grab_op (MetaDisplay *display,
   meta_topic (META_DEBUG_WINDOW_OPS,
               "Ending grab op %u at time %u\n", grab_op, timestamp);
 
-  if (display->event_route == META_EVENT_ROUTE_NORMAL)
+  if (display->event_route == META_EVENT_ROUTE_NORMAL ||
+      display->event_route == META_EVENT_ROUTE_COMPOSITOR_GRAB)
     return;
 
+  g_assert (grab_window != NULL);
+
   g_signal_emit (display, display_signals[GRAB_OP_END], 0,
                  display->screen, grab_window, grab_op);
 


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