display: Remove the same checks in end_grab_op

This commit is contained in:
Jasper St. Pierre 2014-04-28 17:25:39 -04:00
parent 6e8d1d79d1
commit 1d5b4e5b2f

View File

@ -1877,8 +1877,7 @@ meta_display_end_grab_op (MetaDisplay *display,
g_signal_emit (display, display_signals[GRAB_OP_END], 0, g_signal_emit (display, display_signals[GRAB_OP_END], 0,
display->screen, display->grab_window, display->grab_op); display->screen, display->grab_window, display->grab_op);
if (display->grab_window != NULL && if (meta_grab_op_is_moving_or_resizing (display->grab_op))
meta_grab_op_is_moving_or_resizing (display->grab_op))
{ {
/* Clear out the edge cache */ /* Clear out the edge cache */
meta_display_cleanup_edges (display); meta_display_cleanup_edges (display);
@ -1906,10 +1905,7 @@ meta_display_end_grab_op (MetaDisplay *display,
{ {
meta_topic (META_DEBUG_WINDOW_OPS, meta_topic (META_DEBUG_WINDOW_OPS,
"Ungrabbing all keys timestamp %u\n", timestamp); "Ungrabbing all keys timestamp %u\n", timestamp);
if (display->grab_window) meta_window_ungrab_all_keys (display->grab_window, timestamp);
meta_window_ungrab_all_keys (display->grab_window, timestamp);
else
meta_screen_ungrab_all_keys (display->screen, timestamp);
} }
tracker = meta_cursor_tracker_get_for_screen (display->screen); tracker = meta_cursor_tracker_get_for_screen (display->screen);