summaryrefslogtreecommitdiff
path: root/mcwm.c
diff options
context:
space:
mode:
authorMC <mc@hack.org>2010-06-30 13:58:13 +0200
committerMC <mc@hack.org>2010-06-30 13:58:13 +0200
commitd6c8f311e09a2bb78ffe636d373fb44a61720662 (patch)
tree83950a46b421950d0b298fbc1eee8e45aafcac85 /mcwm.c
parent127afdd70593b6f33cb38e53545565aa77f3c131 (diff)
downloadmcwm-d6c8f311e09a2bb78ffe636d373fb44a61720662.zip
Unfocus before unmapping and only if we have a focus.
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)