]> Dogcows Code - chaz/openbox/commitdiff
this is actually xor :) - fixing the focus search function to not return NULL if...
authorScott Moynes <smoynes@nexus.carleton.ca>
Sun, 18 May 2003 17:49:17 +0000 (17:49 +0000)
committerScott Moynes <smoynes@nexus.carleton.ca>
Sun, 18 May 2003 17:49:17 +0000 (17:49 +0000)
openbox/client.c

index 200131e7400c94a77b231dacbff94ca57d4a373d..0e5a59f0ab65dbee51408124b9328d6fc18dc011 100644 (file)
@@ -1402,22 +1402,25 @@ Client *client_search_focus_tree_full(Client *self)
             return client_search_focus_tree_full(self->transient_for);
         } else {
             GSList *it;
+            gboolean recursed = FALSE;
         
             for (it = self->group->members; it; it = it->next)
                 if (!((Client*)it->data)->transient_for) {
                     Client *c;
                     if ((c = client_search_focus_tree_full(it->data)))
                         return c;
+                    recursed = TRUE;
                 }
-            return NULL;
+            if (recursed)
+              return NULL;
         }
-    } else {
-        /* this function checks the whole tree, the client_search_focus_tree
-           does not, so we need to check this window */
-        if (client_focused(self))
-            return self;
-        return client_search_focus_tree(self);
     }
+
+    /* this function checks the whole tree, the client_search_focus_tree~
+       does not, so we need to check this window */
+    if (client_focused(self))
+      return self;
+    return client_search_focus_tree(self);
 }
 
 static StackLayer calc_layer(Client *self)
This page took 0.030477 seconds and 4 git commands to generate.