Improve code of togglefloating func
This commit is contained in:
parent
17607d3d5a
commit
72e4325629
18
dwm.c
18
dwm.c
|
@ -2004,14 +2004,22 @@ togglebar(const Arg *arg)
|
||||||
void
|
void
|
||||||
togglefloating(const Arg *arg)
|
togglefloating(const Arg *arg)
|
||||||
{
|
{
|
||||||
if (!selmon->sel)
|
if (!selmon->sel) return;
|
||||||
return;
|
|
||||||
selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
|
selmon->sel->isfloating = !selmon->sel->isfloating || selmon->sel->isfixed;
|
||||||
if (selmon->sel->isfloating)
|
|
||||||
resize(selmon->sel, selmon->sel->x, selmon->sel->y,
|
if (selmon->sel->isfloating) {
|
||||||
|
resize(
|
||||||
|
selmon->sel,
|
||||||
|
selmon->sel->x,
|
||||||
|
selmon->sel->y,
|
||||||
selmon->sel->w - 2 * (borderpx - selmon->sel->bw),
|
selmon->sel->w - 2 * (borderpx - selmon->sel->bw),
|
||||||
selmon->sel->h - 2 * (borderpx - selmon->sel->bw),
|
selmon->sel->h - 2 * (borderpx - selmon->sel->bw),
|
||||||
borderpx, 0);
|
borderpx,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue