summaryrefslogtreecommitdiffhomepage
path: root/patch/setborderpx.c
diff options
context:
space:
mode:
authorAaron Duxler <[email protected]>2020-09-21 01:08:19 +0200
committerAaron Duxler <[email protected]>2020-09-21 01:08:19 +0200
commit216c95d86efc489f5b812db00305184fab65b751 (patch)
tree2970f66f30791b9042372bf6d603167b67e745a6 /patch/setborderpx.c
parent6eeb5ad13b611e0f5644c316fe4e1f73bbdb7dab (diff)
downloaddwm-flexipatch-216c95d86efc489f5b812db00305184fab65b751.tar.gz
dwm-flexipatch-216c95d86efc489f5b812db00305184fab65b751.zip
minor floating mode fix for setborderpx patch
Diffstat (limited to 'patch/setborderpx.c')
-rw-r--r--patch/setborderpx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/patch/setborderpx.c b/patch/setborderpx.c
index fd4877d..be34b2d 100644
--- a/patch/setborderpx.c
+++ b/patch/setborderpx.c
@@ -17,11 +17,12 @@ setborderpx(const Arg *arg)
c->bw = selmon->borderpx = 0;
else
c->bw = selmon->borderpx;
-
if (c->isfloating || !selmon->lt[selmon->sellt]->arrange)
{
- if (arg->i != 0)
+ if (arg->i != 0 && prev_borderpx + arg->i >= 0)
resize(c, c->x, c->y, c->w-(arg->i*2), c->h-(arg->i*2), 0);
+ else if (arg->i != 0)
+ resizeclient(c, c->x, c->y, c->w, c->h);
else if (prev_borderpx > borderpx)
resize(c, c->x, c->y, c->w + 2*(prev_borderpx - borderpx), c->h + 2*(prev_borderpx - borderpx), 0);
else if (prev_borderpx < borderpx)
@@ -29,4 +30,4 @@ setborderpx(const Arg *arg)
}
}
arrange(selmon);
-} \ No newline at end of file
+}