]> Dogcows Code - chaz/openbox/commitdiff
maybe better logic for looking for focus in's on clients
authorDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 05:50:15 +0000 (05:50 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 13 May 2007 05:50:15 +0000 (05:50 +0000)
openbox/event.c

index eac312df66f09d4e3eb989c90e41c6c7fa42af6e..699dfdd1a5164f6b762e4f66c0300e74d6eab822 100644 (file)
@@ -300,10 +300,15 @@ static gboolean wanted_focusevent(XEvent *e, gboolean in_client_only)
 
         /* These are the ones we want.. */
 
-        if (win == RootWindow(ob_display, ob_screen) && !in_client_only) {
+        if (win == RootWindow(ob_display, ob_screen)) {
+            /* If looking for a focus in on a client, then always return
+               FALSE for focus in's to the root window */
+            if (in_client_only)
+                return FALSE;
             /* This means focus reverted off of a client */
-            if (detail == NotifyPointerRoot || detail == NotifyDetailNone ||
-                detail == NotifyInferior)
+            else if (detail == NotifyPointerRoot ||
+                     detail == NotifyDetailNone ||
+                     detail == NotifyInferior)
                 return TRUE;
             else
                 return FALSE;
This page took 0.025198 seconds and 4 git commands to generate.