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>
This commit is contained in:
parent
299f87f073
commit
db06aea171
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user