diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2023-03-29 15:59:42 +0200 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2023-03-29 16:36:28 +0000 |
commit | 179124dc61bb628ff2eeb2f3127f18c365dafa21 (patch) | |
tree | 22d851ed8a50977bb67405e634f705be598f0eb1 | |
parent | 61801a713a29fe160e1c32b8aafe50cc31d128aa (diff) | |
download | mutter-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.c | 4 |
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 |