aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-03-18 01:25:53 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-03-18 01:27:33 -0600
commit475c13414479d1013c83309fcc4bb8a8707aa721 (patch)
tree9be3e550ad1a9c5a9727519b9db2786f9be45df2 /dwl.c
parent467123dc99db4a537f1043e081cc4a6db136417b (diff)
do not allow set client size less than its min size
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index c63dbe4..d2f0718 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1636,11 +1636,13 @@ rendermon(struct wl_listener *listener, void *data)
void
resize(Client *c, int x, int y, int w, int h, int interact)
{
+ int min_width = 0, min_height = 0;
struct wlr_box *bbox = interact ? &sgeom : &c->mon->w;
+ client_min_size(c, &min_width, &min_height);
c->geom.x = x;
c->geom.y = y;
- c->geom.width = w;
- c->geom.height = h;
+ c->geom.width = MAX(min_width + 2 * c->bw, w);
+ c->geom.height = MAX(min_height + 2 * c->bw, h);
applybounds(c, bbox);
/* Update scene-graph, including borders */