]> Dogcows Code - chaz/openbox/commitdiff
ignore some focus events that shouldnt be reacted to
authorDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 20:10:17 +0000 (20:10 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 22 Apr 2007 20:10:17 +0000 (20:10 +0000)
openbox/event.c

index 096f6272bd608a1a7bf8d99218df6476c69bd872..47c7f7a705440461ce0753d1093460c458728621 100644 (file)
@@ -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
This page took 0.026183 seconds and 4 git commands to generate.