[mutter] display: Reset all grab properties after a grab op
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] display: Reset all grab properties after a grab op
- Date: Fri, 26 Feb 2021 15:14:29 +0000 (UTC)
commit 91d03f1c96f6dae9c13c8fbb00cf1763bac30886
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri Feb 19 12:26:12 2021 +0100
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>
src/core/display.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/core/display.c b/src/core/display.c
index 8261d42556..f23618e560 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]