summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcwm.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/mcwm.c b/mcwm.c
index 72a2eec..4c39ec4 100644
--- a/mcwm.c
+++ b/mcwm.c
@@ -1312,22 +1312,21 @@ void events(void)
* focus in these cases.
*
*/
- if (e->mode != XCB_NOTIFY_MODE_NORMAL)
+ if (e->mode == XCB_NOTIFY_MODE_NORMAL
+ || e->mode == XCB_NOTIFY_MODE_UNGRAB)
{
- PDEBUG("Not a normal EnterNotify. Ignoring.\n");
- break;
- }
- /*
- * If we're entering the same window we focus now,
- * then don't bother focusing.
- */
- if (e->event != focuswin)
- {
/*
- * Otherwise, set focus to the window we just entered.
+ * If we're entering the same window we focus now,
+ * then don't bother focusing.
*/
- setfocus(e->event);
+ if (e->event != focuswin)
+ {
+ /*
+ * Otherwise, set focus to the window we just entered.
+ */
+ setfocus(e->event);
+ }
}
}
break;