summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2023-03-29 15:59:42 +0200
committerMarge Bot <marge-bot@gnome.org>2023-03-29 16:36:28 +0000
commit179124dc61bb628ff2eeb2f3127f18c365dafa21 (patch)
tree22d851ed8a50977bb67405e634f705be598f0eb1
parent61801a713a29fe160e1c32b8aafe50cc31d128aa (diff)
downloadmutter-179124dc61bb628ff2eeb2f3127f18c365dafa21.tar.gz
compositor: Avoid use of variable during resize
Since we only track changes to window_drag->anchor_window_pos during move operations through on_grab_window_size_changed(), this rectangle is in essence the same than window_drag->initial_window_pos all the time. Just use that and move away from the anchor_window_pos rectangle. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2942>
-rw-r--r--src/compositor/meta-window-drag.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor/meta-window-drag.c b/src/compositor/meta-window-drag.c
index 2d16da4a2..86b29c71f 100644
--- a/src/compositor/meta-window-drag.c
+++ b/src/compositor/meta-window-drag.c
@@ -1451,8 +1451,8 @@ update_resize (MetaWindowDrag *window_drag,
dy *= 2;
}
- new_rect.width = window_drag->anchor_window_pos.width;
- new_rect.height = window_drag->anchor_window_pos.height;
+ new_rect.width = window_drag->initial_window_pos.width;
+ new_rect.height = window_drag->initial_window_pos.height;
/* Don't bother doing anything if no move has been specified. (This
* happens often, even in keyboard resizing, due to the warping of the