properly search for a focused window in the transient tree
This commit is contained in:
parent
30912d467a
commit
e9f6255b18
1 changed files with 8 additions and 10 deletions
|
@ -2355,21 +2355,19 @@ ObClient *client_search_focus_tree_full(ObClient *self)
|
||||||
return client_search_focus_tree_full(self->transient_for);
|
return client_search_focus_tree_full(self->transient_for);
|
||||||
} else {
|
} else {
|
||||||
GSList *it;
|
GSList *it;
|
||||||
gboolean recursed = FALSE;
|
|
||||||
|
|
||||||
for (it = self->group->members; it; it = g_slist_next(it))
|
for (it = self->group->members; it; it = g_slist_next(it)) {
|
||||||
if (!((ObClient*)it->data)->transient_for) {
|
if (it->data != self) {
|
||||||
ObClient *c;
|
ObClient *c = it->data;
|
||||||
if ((c = client_search_focus_tree_full(it->data)))
|
|
||||||
return c;
|
if (client_focused(c)) return c;
|
||||||
recursed = TRUE;
|
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 */
|
does not, so we need to check this window */
|
||||||
if (client_focused(self))
|
if (client_focused(self))
|
||||||
return self;
|
return self;
|
||||||
|
|
Loading…
Reference in a new issue