mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
[dwm][patch] setborderpx minor code style changes
This commit is contained in:
parent
ae5c96c217
commit
29a06f83a0
@ -5,28 +5,30 @@ setborderpx(const Arg *arg)
|
||||
int prev_borderpx = selmon->borderpx;
|
||||
|
||||
if (arg->i == 0)
|
||||
mons->borderpx = borderpx;
|
||||
else if (mons->borderpx + arg->i < 0)
|
||||
mons->borderpx = 0;
|
||||
selmon->borderpx = borderpx;
|
||||
else if (selmon->borderpx + arg->i < 0)
|
||||
selmon->borderpx = 0;
|
||||
else
|
||||
mons->borderpx += arg->i;
|
||||
selmon->borderpx += arg->i;
|
||||
|
||||
for (c = mons->clients; c; c = c->next)
|
||||
for (c = selmon->clients; c; c = c->next)
|
||||
{
|
||||
if (c->bw + arg->i < 0)
|
||||
c->bw = mons->borderpx = 0;
|
||||
c->bw = selmon->borderpx = 0;
|
||||
else
|
||||
c->bw = mons->borderpx;
|
||||
{
|
||||
c->bw = selmon->borderpx;
|
||||
|
||||
if (c->isfloating || !selmon->lt[selmon->sellt]->arrange)
|
||||
{
|
||||
if (arg->i != 0 && prev_borderpx + arg->i >= 0)
|
||||
if (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 && prev_borderpx > borderpx)
|
||||
else if (prev_borderpx > borderpx)
|
||||
resize(c, c->x + prev_borderpx - borderpx, c->y + prev_borderpx - borderpx, c->w, c->h, 0);
|
||||
else if (arg->i == 0 && prev_borderpx < borderpx)
|
||||
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