From 5ba6eddc8beeb2263ac3b0a2674f97e823e3ed3f Mon Sep 17 00:00:00 2001 From: Rimsoo <50300684+Rimsoo@users.noreply.github.com> Date: Fri, 21 Mar 2025 20:29:10 +0100 Subject: [PATCH] Fixed window attach at the end for multi monitor setup Not resetting c->next with multi monitors creates an endless loop and crashes. Step to reproduce : - Open one client in each monitor - Move one of the clients to the other monitor - Move back a client to the first window -> Start crashing => ctrl+alt+f3 to kill chadwm --- chadwm/dwm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/chadwm/dwm.c b/chadwm/dwm.c index 041d6a57..46ad74e2 100644 --- a/chadwm/dwm.c +++ b/chadwm/dwm.c @@ -590,6 +590,7 @@ void arrangemon(Monitor *m) { void attach(Client *c) { if(new_window_attach_on_end){ + c->next = NULL; Client**tmp = &c->mon->clients; while(*tmp)tmp = &(*tmp)->next; *tmp = c;