summaryrefslogtreecommitdiff
path: root/mcwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'mcwm.c')
-rw-r--r--mcwm.c8
1 files changed, 6 insertions, 2 deletions
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)