mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-07-21 10:44:25 +00:00
desktop-shell: don't allow negative values in drag resize
Now clamping width and height to a minimum of 1, 1 when drag resizing. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
parent
561662ba02
commit
70ac0edcab
|
@ -1838,6 +1838,10 @@ resize_grab_motion(struct weston_pointer_grab *grab, uint32_t time,
|
|||
height += wl_fixed_to_int(to_y - from_y);
|
||||
}
|
||||
|
||||
if (width < 1)
|
||||
width = 1;
|
||||
if (height < 1)
|
||||
height = 1;
|
||||
shsurf->client->send_configure(shsurf->surface, width, height);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue