Adding togglelayout patch

This commit is contained in:
bakkeby
2021-05-30 19:22:00 +02:00
parent a76fb54d79
commit 246f8f7260
3 changed files with 203 additions and 83 deletions

10
dwm.c
View File

@@ -3369,7 +3369,9 @@ setfullscreen(Client *c, int fullscreen)
void
setlayout(const Arg *arg)
{
#if !TOGGLELAYOUT_PATCH
if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) {
#endif // TOGGLELAYOUT_PATCH
#if PERTAG_PATCH
selmon->pertag->sellts[selmon->pertag->curtag] ^= 1;
selmon->sellt = selmon->pertag->sellts[selmon->pertag->curtag];
@@ -3387,8 +3389,14 @@ setlayout(const Arg *arg)
}
}
#endif // EXRESIZE_PATCH
#if !TOGGLELAYOUT_PATCH
}
#endif // TOGGLELAYOUT_PATCH
#if TOGGLELAYOUT_PATCH
if (arg && arg->v && arg->v != selmon->lt[selmon->sellt ^ 1])
#else
if (arg && arg->v)
#endif // TOGGLELAYOUT_PATCH
#if PERTAG_PATCH
selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt] = (Layout *)arg->v;
selmon->lt[selmon->sellt] = selmon->pertag->ltidxs[selmon->pertag->curtag][selmon->sellt];
@@ -4611,7 +4619,7 @@ view(const Arg *arg)
view(&((Arg) { .ui = 0 }));
#endif // VIEW_SAME_TAG_GIVES_PREVIOUS_TAG_PATCH
return;
}
}
selmon->seltags ^= 1; /* toggle sel tagset */
#if PERTAG_PATCH
pertagview(arg);