From d6c8f311e09a2bb78ffe636d373fb44a61720662 Mon Sep 17 00:00:00 2001 From: MC Date: Wed, 30 Jun 2010 13:58:13 +0200 Subject: Unfocus before unmapping and only if we have a focus. --- mcwm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mcwm.c') diff --git a/mcwm.c b/mcwm.c index 3ee2ddf..1431418 100644 --- a/mcwm.c +++ b/mcwm.c @@ -294,6 +294,12 @@ void changeworkspace(int ws) } PDEBUG("Changing from workspace #%d to #%d\n", curws, ws); + + if (NULL != focuswin) + { + setunfocus(focuswin->id); + focuswin = NULL; + } /* Go through list of current ws. Unmap everything that isn't fixed. */ for (item = wslist[curws]; item != NULL; item = item->next) @@ -304,8 +310,6 @@ void changeworkspace(int ws) xcb_unmap_window(conn, client->id); } } - - focuswin = NULL; /* Go through list of new ws. Map everything that isn't fixed. */ for (item = wslist[ws]; item != NULL; item = item->next) -- cgit v1.2.3