summaryrefslogtreecommitdiff
path: root/mcwm.c
diff options
context:
space:
mode:
authorMichael Cardell Widerkrantz <mc@hack.org>2010-07-28 14:41:10 +0200
committerMichael Cardell Widerkrantz <mc@hack.org>2010-07-28 14:41:10 +0200
commitafd76031d37e25af61454e8e1201cea7749bce67 (patch)
tree8f4912798b4b29d38b401a25302bc4888eae3bb2 /mcwm.c
parent61c9fe9a9e0000977a85bd3b1777b0c16b1be6f2 (diff)
downloadmcwm-afd76031d37e25af61454e8e1201cea7749bce67.zip
Don't bother to try to set focus if we get an EnterNotify for a window
we don't know anything about. This seems to fix the unclutter(1) problem.
Diffstat (limited to 'mcwm.c')
-rw-r--r--mcwm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mcwm.c b/mcwm.c
index d940fc1..83a2fc3 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -2554,13 +2554,18 @@ void events(void)
{
/*
* Otherwise, set focus to the window we just
- * entered. Note that setfocus() will handle the
- * case if we didn't find the client.
+ * entered if we can find it among the windows we
+ * know about. If not, just keep focus in the old
+ * window.
*/
client = findclient(e->event);
- setfocus(client);
+ if (NULL != client)
+ {
+ setfocus(client);
+ }
}
}
+
}
break;