From 179124dc61bb628ff2eeb2f3127f18c365dafa21 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 29 Mar 2023 15:59:42 +0200 Subject: 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: --- src/compositor/meta-window-drag.c | 4 ++-- 1 file 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 -- cgit v1.2.1