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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1736>
This commit is contained in:
Jonas Dreßler 2021-02-19 12:26:12 +01:00 committed by Marge Bot
parent 3bbfaa03b3
commit 91d03f1c96

View File

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