summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cardell Widerkrantz <mc@hack.org>2010-08-04 21:26:04 +0200
committerMichael Cardell Widerkrantz <mc@hack.org>2010-08-04 21:26:04 +0200
commitec73cb29300ef738541ef5f38ee6547bac861d33 (patch)
treee2c71f59573b3a180d4e4126e73e904bfc703189
parent8c32ff8b953b33add7cf2ff9a305801c87a9d8d4 (diff)
downloadmcwm-ec73cb29300ef738541ef5f38ee6547bac861d33.zip
Stop already known clients trying to map themselves onto the current
workspace.
-rw-r--r--mcwm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/mcwm.c b/mcwm.c
index 6faac0e..02ec981 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -727,7 +727,18 @@ void newwin(xcb_window_t win)
uint16_t width;
uint16_t height;
struct client *client;
-
+
+ if (NULL != findclient(win))
+ {
+ /*
+ * We know this window from before. It's trying to map itself
+ * on the current workspace, but since it's unmapped it
+ * probably belongs on another workspace. We don't like that.
+ * Silently ignore.
+ */
+ return;
+ }
+
/* Get pointer position so we can move the window to the cursor. */
if (!getpointer(screen->root, &pointx, &pointy))