diff options
| author | Scott Moynes <smoynes@nexus.carleton.ca> | 2003-05-18 17:49:17 +0000 |
|---|---|---|
| committer | Scott Moynes <smoynes@nexus.carleton.ca> | 2003-05-18 17:49:17 +0000 |
| commit | d8921eb3d2279af3dfc8f8ff4e32509bde4a3b54 (patch) | |
| tree | bb9ff6920ecf39a51d12362f38ea87a16ed82770 | |
| parent | cea19c78c1d3bccb356fce21cda4a2fc85afce1b (diff) | |
this is actually xor :) - fixing the focus search function to not return NULL if no valid group members exist to be a transient for
| -rw-r--r-- | openbox/client.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/openbox/client.c b/openbox/client.c index 200131e7..0e5a59f0 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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) |
