From: Tiago Cunha Date: Sat, 12 May 2012 21:17:22 +0000 (+0100) Subject: Kill references before focusing on a new window. X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=900f61bbbbd37bffe783bd5453d41f49a459e32e;p=spectrwm.git Kill references before focusing on a new window. Like the other focusing functions, make focus_prev call kill_refs before trying to focus on a new window. This way, the current window references are cleared like it should be when the very last window is destroyed. Otherwise, the status-bar output will contain (while its alarm does not expire) the class hint of the to be removed window. --- diff --git a/spectrwm.c b/spectrwm.c index 038b1b0..1cf254e 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -2576,6 +2576,7 @@ done: winfocus = TAILQ_FIRST(wl); } + kill_refs(win); focus_magic(winfocus); } @@ -6178,8 +6179,6 @@ unmanage_window(struct ws_win *win) TAILQ_REMOVE(&win->ws->winlist, win, entry); TAILQ_INSERT_TAIL(&win->ws->unmanagedlist, win, entry); - - kill_refs(win); } void