From 4360e1e96fc089753316d5d9b75796ee8d4ba741 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Wed, 18 Jan 2012 04:05:38 +0200 Subject: update current client even it was not the one that was removed this fixes some strange problems with eg LibreOffice Writer that left the client list unfocused, no window was current and not window was focus/highlighted. this will cause some unwanted behavior when one for example kills an app from a terminal that wasn't previously focused. --- monsterwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monsterwm.c b/monsterwm.c index 335c621..6380ad3 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -676,7 +676,7 @@ void removeclient(client *c) { for (Bool found = False; ndnext); *p = c->next; - if (current == c) current = (prevfocus && prevfocus != c) ? prevfocus : (*p) ? (prevfocus = *p) : (prevfocus = head); + current = (prevfocus && prevfocus != c) ? prevfocus : (*p) ? (prevfocus = *p) : (prevfocus = head); select_desktop(cd); tile(); if (mode == MONOCLE && cd == --nd && current) XMapWindow(dis, current->win); -- cgit v1.3.1