From ae7aabd5de134c48ec8cad9ecb15b06f57b16fa1 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Tue, 6 Oct 2015 21:10:13 -0400 Subject: [PATCH] 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 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/display.c b/src/core/display.c index a7bf0cd58..dbfbc68f0 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);