Make code made by pertag patch more readable
This commit is contained in:
parent
254b6a4c13
commit
bd4ebce470
1 changed files with 18 additions and 6 deletions
24
dwm.c
24
dwm.c
|
@ -1788,15 +1788,27 @@ setfullscreen(Client *c, int fullscreen)
|
|||
void
|
||||
setlayout(const Arg *arg)
|
||||
{
|
||||
if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt])
|
||||
if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) {
|
||||
selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag] ^= 1;
|
||||
if (arg && arg->v)
|
||||
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v;
|
||||
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
|
||||
if (selmon->sel)
|
||||
}
|
||||
|
||||
if (arg && arg->v) {
|
||||
const Layout *const new_layout = arg->v;
|
||||
selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = new_layout;
|
||||
selmon->lt[selmon->sellt] = new_layout;
|
||||
}
|
||||
|
||||
strncpy(
|
||||
selmon->ltsymbol,
|
||||
selmon->lt[selmon->sellt]->symbol,
|
||||
sizeof(selmon->ltsymbol)
|
||||
);
|
||||
|
||||
if (selmon->sel) {
|
||||
arrange(selmon);
|
||||
else
|
||||
} else {
|
||||
drawbar(selmon);
|
||||
}
|
||||
}
|
||||
|
||||
/* arg > 1.0 will set mfact absolutely */
|
||||
|
|
Loading…
Reference in a new issue