From afd76031d37e25af61454e8e1201cea7749bce67 Mon Sep 17 00:00:00 2001 From: Michael Cardell Widerkrantz Date: Wed, 28 Jul 2010 14:41:10 +0200 Subject: 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. --- mcwm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'mcwm.c') 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; -- cgit v1.2.3