diff options
author | Michael Cardell Widerkrantz <mc@hack.org> | 2010-07-23 16:27:09 +0200 |
---|---|---|
committer | Michael Cardell Widerkrantz <mc@hack.org> | 2010-07-23 16:27:09 +0200 |
commit | b996ffa9da9a9d532177a44f0ef0b73feace0a66 (patch) | |
tree | fca778dc62a00529a557a72652a65562b196ecee /mcwm.c | |
parent | 8b7eccc50795ad9d6a261fca54fabf7a861b22b5 (diff) | |
download | mcwm-b996ffa9da9a9d532177a44f0ef0b73feace0a66.zip |
Oops. Check for min_width in mouseresize() as well.
Add check for minimum size when resizing by keyboard.
Diffstat (limited to 'mcwm.c')
-rw-r--r-- | mcwm.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -1433,6 +1433,17 @@ void resizestep(struct client *client, char direction) break; } /* switch direction */ + /* Is it smaller than it wants to be? */ + if (0 != client->min_height && height < client->min_height) + { + height = client->min_height; + } + + if (0 != client->min_width && width < client->min_width) + { + width = client->min_width; + } + PDEBUG("Resizing to %dx%d\n", width, height); resize(win, width, height); @@ -1552,12 +1563,17 @@ void mouseresize(struct client *client, int rel_x, int rel_y) width -= (width - client->base_width) % client->width_inc; height -= (height - client->base_height) % client->height_inc; - /* Is it smaller than it says it can be? */ + /* Is it smaller than it wants to be? */ if (0 != client->min_height && height < client->min_height) { height = client->min_height; } + if (0 != client->min_width && width < client->min_width) + { + width = client->min_width; + } + /* Check if the window fits on screen. */ if (x + width > screen->width_in_pixels - BORDERWIDTH * 2) { |