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
This commit is contained in:
Owen W. Taylor 2015-10-06 21:10:13 -04:00
parent b975676c5d
commit ae7aabd5de

View File

@ -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);