summaryrefslogtreecommitdiffhomepage
path: root/dwm.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2021-05-30 19:22:00 +0200
committerbakkeby <[email protected]>2021-05-30 19:22:00 +0200
commit246f8f7260ee3fdd0cf0d6d73163cb1f4604c895 (patch)
treea2a689dc5bd17270b29bbc603122799943c849af /dwm.c
parenta76fb54d790aef6c9a06b1adee23039c659db535 (diff)
downloaddwm-flexipatch-246f8f7260ee3fdd0cf0d6d73163cb1f4604c895.tar.gz
dwm-flexipatch-246f8f7260ee3fdd0cf0d6d73163cb1f4604c895.zip
Adding togglelayout patch
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/dwm.c b/dwm.c
index 9719252..8acedd4 100644
--- a/dwm.c
+++ b/dwm.c
@@ -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);