summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2022-01-07 22:27:08 +0100
committerbakkeby <[email protected]>2022-02-11 11:43:34 +0100
commitaa1a7ff708572535c1e952e6318128b69142a893 (patch)
treef66f55643c6d81d34e0838e2b5c49354039b996a /patch
parent6667f1030bcb43716c81867eecf6efcb070c2c3d (diff)
downloaddwm-flexipatch-aa1a7ff708572535c1e952e6318128b69142a893.tar.gz
dwm-flexipatch-aa1a7ff708572535c1e952e6318128b69142a893.zip
Fix for infinite loop when there is only one client and pushup is run twice
Diffstat (limited to 'patch')
-rw-r--r--patch/push.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/patch/push.c b/patch/push.c
index 9410e61..68123a6 100644
--- a/patch/push.c
+++ b/patch/push.c
@@ -40,9 +40,11 @@ pushup(const Arg *arg)
} else {
/* move to the end */
for (c = sel; c->next; c = c->next);
- detach(sel);
- sel->next = NULL;
- c->next = sel;
+ if (sel != c) {
+ detach(sel);
+ sel->next = NULL;
+ c->next = sel;
+ }
}
focus(sel);
arrange(selmon);