]> Dogcows Code - chaz/openbox/commitdiff
properly search for a focused window in the transient tree
authorDana Jansens <danakj@orodu.net>
Mon, 28 May 2007 02:02:13 +0000 (02:02 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 28 May 2007 02:02:13 +0000 (02:02 +0000)
openbox/client.c

index 5c025229af84f31ddb2212cf22f4e437705915d9..2974083aacda8279daab9547af2a49cfe011c7dc 100644 (file)
@@ -2355,21 +2355,19 @@ ObClient *client_search_focus_tree_full(ObClient *self)
             return client_search_focus_tree_full(self->transient_for);
         } else {
             GSList *it;
-            gboolean recursed = FALSE;
         
-            for (it = self->group->members; it; it = g_slist_next(it))
-                if (!((ObClient*)it->data)->transient_for) {
-                    ObClient *c;
-                    if ((c = client_search_focus_tree_full(it->data)))
-                        return c;
-                    recursed = TRUE;
+            for (it = self->group->members; it; it = g_slist_next(it)) {
+                if (it->data != self) {
+                    ObClient *c = it->data;
+
+                    if (client_focused(c)) return c;
+                    if ((c = client_search_focus_tree(it->data))) return c;
                 }
-            if (recursed)
-                return NULL;
+            }
         }
     }
 
-    /* this function checks the whole tree, the client_search_focus_tree~
+    /* 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;
This page took 0.026803 seconds and 4 git commands to generate.