diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2015-03-18 11:16:33 -0500 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-03-18 10:34:18 -0700 |
commit | 70ac0edcabc110a1cdaf885ba16f999af15f3190 (patch) | |
tree | 17ef92b94da9d2c2029b51c19b1e36ae75c229d4 /desktop-shell | |
parent | 561662ba02ed77cd9e17791a59769d7e24c1ea8d (diff) | |
download | weston-70ac0edcabc110a1cdaf885ba16f999af15f3190.tar.gz weston-70ac0edcabc110a1cdaf885ba16f999af15f3190.tar.bz2 weston-70ac0edcabc110a1cdaf885ba16f999af15f3190.zip |
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>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 826692fc..aca91eb8 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -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); } |