summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStein Gunnar Bakkeby <[email protected]>2020-09-21 14:14:45 +0200
committerGitHub <[email protected]>2020-09-21 14:14:45 +0200
commitd906aa7a24071750bc0c6bb94ef3b6c8f38db115 (patch)
tree8efafd4a3900be1a4892c157f17c6e3c3b66bb8d
parent6eeb5ad13b611e0f5644c316fe4e1f73bbdb7dab (diff)
parentda05d567a1b5d7bcf6512ce7e5af995655b5af36 (diff)
downloaddwm-flexipatch-d906aa7a24071750bc0c6bb94ef3b6c8f38db115.tar.gz
dwm-flexipatch-d906aa7a24071750bc0c6bb94ef3b6c8f38db115.zip
Merge pull request #46 from Schueni1/master
minor floating mode fix for setborderpx patch
-rw-r--r--README.md2
-rw-r--r--patch/setborderpx.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/README.md b/README.md
index 728c820..bf95801 100644
--- a/README.md
+++ b/README.md
@@ -471,7 +471,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- [sendmon_keepfocus](https://github.com/bakkeby/patches/wiki/sendmon_keepfocus/)
- minor patch that allow clients to keep focus when being sent to another monitor
- - [setborderpx](https://dwm.suckless.org/patches/statuspadding/)
+ - [setborderpx](https://dwm.suckless.org/patches/setborderpx/)
- this patch allows border pixels to be changed during runtime
- [shiftview](https://github.com/chau-bao-long/dotfiles/blob/master/suckless/dwm/shiftview.diff)
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
+}