diff options
| author | bakkeby <[email protected]> | 2022-01-07 22:27:08 +0100 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2022-01-07 22:27:08 +0100 |
| commit | 9ea0cb6c7c6863f58c332438cc4dae1cc156db56 (patch) | |
| tree | de8be6528cb4268529c709afe100575d5e575ec9 | |
| parent | 40d30e5d1bc4c1a57eab850657ad5818477ac153 (diff) | |
| download | dwm-flexipatch-9ea0cb6c7c6863f58c332438cc4dae1cc156db56.tar.gz dwm-flexipatch-9ea0cb6c7c6863f58c332438cc4dae1cc156db56.zip | |
Fix for infinite loop when there is only one client and pushup is run twice
| -rw-r--r-- | patch/push.c | 8 |
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); |
