summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.com>2022-05-13 07:28:33 -0500
committerDerek Foreman <derek.foreman@collabora.com>2022-05-13 08:17:02 -0500
commitdb06aea1714facb3e1b789f18f3a5bf44adc0b96 (patch)
tree26a3c85c08fabc6a2d17f2875903b11b8843a9e6 /desktop-shell
parent299f87f0739ac3c73d71fb4000f18d455fcf4a4b (diff)
downloadweston-db06aea1714facb3e1b789f18f3a5bf44adc0b96.tar.gz
desktop-shell: Check height instead of checking width a second time
Fix an apparent copy and paste error in resize code. I'm not sure anything sets the relevant callback that would lead to height being different than width, so there's no easy way to demonstrate a bug, but this change appears to rectify the intent of the code. Reported-by: Hideyuki Nagase <hideyukn@microsoft.com> Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 54469d3a..4641c030 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1626,8 +1626,8 @@ resize_grab_motion(struct weston_pointer_grab *grab,
width = max_size.width;
if (height < min_size.height)
height = min_size.height;
- else if (max_size.width > 0 && width > max_size.width)
- width = max_size.width;
+ else if (max_size.height > 0 && height > max_size.height)
+ height = max_size.height;
weston_desktop_surface_set_size(shsurf->desktop_surface, width, height);
}