return desktop;
}
-void focus_fallback(gboolean allow_refocus)
+ObClient* focus_fallback(gboolean allow_refocus)
{
ObClient *new;
ObClient *old = focus_client;
*/
focus_nothing();
- if ((new = focus_fallback_target(allow_refocus, old)))
+ if ((new = focus_fallback_target(allow_refocus, old))) {
client_focus(new);
+ return new;
+ } else
+ return NULL;
}
void focus_nothing()
for (it = ft->group->members; it; it = g_slist_next(it)) {
ObClient *c = it->data;
/* check that it's not a helper window to avoid infinite recursion */
- if (c != ft && !client_helper(ft) &&
- valid_focus_target(ft, all_desktops, FALSE))
+ if (c != ft && !client_helper(c) &&
+ valid_focus_target(c, all_desktops, FALSE))
{
return TRUE;
}