Merge pull request #46 from Schueni1/master

minor floating mode fix for setborderpx patch
This commit is contained in:
Stein Gunnar Bakkeby 2020-09-21 14:14:45 +02:00 committed by GitHub
commit d906aa7a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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/) - [sendmon_keepfocus](https://github.com/bakkeby/patches/wiki/sendmon_keepfocus/)
- minor patch that allow clients to keep focus when being sent to another monitor - 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 - this patch allows border pixels to be changed during runtime
- [shiftview](https://github.com/chau-bao-long/dotfiles/blob/master/suckless/dwm/shiftview.diff) - [shiftview](https://github.com/chau-bao-long/dotfiles/blob/master/suckless/dwm/shiftview.diff)

View File

@ -17,11 +17,12 @@ setborderpx(const Arg *arg)
c->bw = selmon->borderpx = 0; c->bw = selmon->borderpx = 0;
else else
c->bw = selmon->borderpx; c->bw = selmon->borderpx;
if (c->isfloating || !selmon->lt[selmon->sellt]->arrange) 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); 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) else if (prev_borderpx > borderpx)
resize(c, c->x, c->y, c->w + 2*(prev_borderpx - borderpx), c->h + 2*(prev_borderpx - borderpx), 0); resize(c, c->x, c->y, c->w + 2*(prev_borderpx - borderpx), c->h + 2*(prev_borderpx - borderpx), 0);
else if (prev_borderpx < borderpx) else if (prev_borderpx < borderpx)