window: Only clamp min size for windows with frame
authorKristian Høgsberg <krh@bitplanet.net>
Mon, 21 Oct 2013 22:23:17 +0000 (15:23 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 21 Oct 2013 22:23:23 +0000 (15:23 -0700)
Also fix width/height typo.

clients/window.c

index e7c54d2..506357f 100644 (file)
@@ -3741,14 +3741,14 @@ window_schedule_resize(struct window *window, int width, int height)
        window->pending_allocation.height = height;
 
        if (window->min_allocation.width == 0) {
-               if (width < min_width)
+               if (width < min_width && window->frame)
                        window->min_allocation.width = min_width;
                else
                        window->min_allocation.width = width;
-               if (height < min_height)
+               if (height < min_height && window->frame)
                        window->min_allocation.height = min_height;
                else
-                       window->min_allocation.height = width;
+                       window->min_allocation.height = height;
        }
 
        if (window->pending_allocation.width < window->min_allocation.width)