From 70ac0edcabc110a1cdaf885ba16f999af15f3190 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 18 Mar 2015 11:16:33 -0500 Subject: [PATCH] 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 Reviewed-by: Jasper St. Pierre Reviewed-by: Bryce Harrington --- desktop-shell/shell.c | 4 ++++ 1 file changed, 4 insertions(+) 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); }