summaryrefslogtreecommitdiff
path: root/openbox/event.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-04-22 20:10:17 +0000
committerDana Jansens <danakj@orodu.net>2007-04-22 20:10:17 +0000
commiteb1cd9cc499da864b04cc39a2cf6bd8bf247248b (patch)
tree99779afa4b951c50f49c83efcde52fd9183c4e33 /openbox/event.c
parentdc43b74abdfdf9f8d847ba562accd8ea6dcd52b1 (diff)
ignore some focus events that shouldnt be reacted to
Diffstat (limited to 'openbox/event.c')
-rw-r--r--openbox/event.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/openbox/event.c b/openbox/event.c
index 096f6272..47c7f7a7 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -348,10 +348,6 @@ static gboolean wanted_focusevent(XEvent *e)
if (detail == NotifyNonlinearVirtual)
return TRUE;
- /* This means focus reverted off of a client */
- if (detail == NotifyInferior)
- return TRUE;
-
/* Otherwise.. */
return FALSE;
} else {
@@ -391,7 +387,12 @@ static gboolean event_ignore(XEvent *e, ObClient *client)
{
switch(e->type) {
case FocusIn:
+ if (!wanted_focusevent(e))
+ return TRUE;
+ break;
case FocusOut:
+ if (client == NULL)
+ return TRUE;
if (!wanted_focusevent(e))
return TRUE;
break;
@@ -454,7 +455,7 @@ static void event_process(const XEvent *ec, gpointer data)
event_handle_menu(e);
} else if (e->type == FocusIn) {
if (e->xfocus.detail == NotifyPointerRoot ||
- e->xfocus.detail == NotifyDetailNone) {
+ e->xfocus.detail == NotifyDetailNone) {
ob_debug_type(OB_DEBUG_FOCUS, "Focus went to root\n");
/* Focus has been reverted to the root window or nothing
FocusOut events come after UnmapNotify, so we don't need to