mirror of
https://github.com/bakkeby/dwm-flexipatch
synced 2024-11-05 00:00:18 +00:00
[dwm][patch] setborderpx reset floating windows to previous size
This commit is contained in:
parent
29a06f83a0
commit
57ef22eaba
@ -16,18 +16,16 @@ setborderpx(const Arg *arg)
|
||||
if (c->bw + arg->i < 0)
|
||||
c->bw = selmon->borderpx = 0;
|
||||
else
|
||||
{
|
||||
c->bw = selmon->borderpx;
|
||||
|
||||
if (c->isfloating || !selmon->lt[selmon->sellt]->arrange)
|
||||
{
|
||||
if (arg->i != 0)
|
||||
resize(c, c->x, c->y, c->w-(arg->i*2), c->h-(arg->i*2), 0);
|
||||
else if (prev_borderpx > borderpx)
|
||||
resize(c, c->x + prev_borderpx - borderpx, c->y + prev_borderpx - borderpx, c->w, c->h, 0);
|
||||
else if (prev_borderpx < borderpx)
|
||||
resize(c, c->x, c->y, c->w-2*(borderpx - prev_borderpx), c->h-2*(borderpx - prev_borderpx), 0);
|
||||
}
|
||||
if (c->isfloating || !selmon->lt[selmon->sellt]->arrange)
|
||||
{
|
||||
if (arg->i != 0)
|
||||
resize(c, c->x, c->y, c->w-(arg->i*2), c->h-(arg->i*2), 0);
|
||||
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)
|
||||
resize(c, c->x, c->y, c->w - 2*(borderpx - prev_borderpx), c->h - 2*(borderpx - prev_borderpx), 0);
|
||||
}
|
||||
}
|
||||
arrange(selmon);
|
||||
|
Loading…
Reference in New Issue
Block a user