From 91d03f1c96f6dae9c13c8fbb00cf1763bac30886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Fri, 19 Feb 2021 12:26:12 +0100 Subject: [PATCH] display: Reset all grab properties after a grab op Make sure to reset all the state that was set for an interactive grab op back to the defaults after a grab op has ended. Especially important here is setting grab_frame_action back to FALSE, since this will constrain window-titlebars to the panel. We set this to TRUE on some grabs, for example when resizing, but not when moving windows. Since this remained being set to TRUE, it would also constrain non-grab window movements, like calling MetaWindow.move_frame(), which is used by gnome-shells OSK. By resetting it back to FALSE after a grab, the OSK can now always move non-maximized windows to the position it wants. Part-of: --- src/core/display.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/display.c b/src/core/display.c index 8261d4255..f23618e56 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -1966,8 +1966,16 @@ meta_display_end_grab_op (MetaDisplay *display, display->event_route = META_EVENT_ROUTE_NORMAL; display->grab_window = NULL; + display->grab_button = 0; display->grab_tile_mode = META_TILE_NONE; display->grab_tile_monitor_number = -1; + display->grab_anchor_root_x = 0; + display->grab_anchor_root_y = 0; + display->grab_latest_motion_x = 0; + display->grab_latest_motion_y = 0; + display->grab_last_moveresize_time = 0; + display->grab_last_edge_resistance_flags = META_EDGE_RESISTANCE_DEFAULT; + display->grab_frame_action = FALSE; meta_display_update_cursor (display);