return c;
}
- ob_debug_type(OB_DEBUG_FOCUS, "trying omnipresentness\n");
- if (allow_refocus && old &&
- old->desktop == DESKTOP_ALL &&
- client_normal(old) &&
- client_focus(old))
- {
- ob_debug_type(OB_DEBUG_FOCUS, "found in omnipresentness\n");
- return old;
- }
-
-
ob_debug_type(OB_DEBUG_FOCUS, "trying the focus order\n");
for (it = focus_order; it; it = g_list_next(it)) {
c = it->data;
}
}
+ if (focus_client && (focus_client->desktop == DESKTOP_ALL ||
+ focus_client->desktop == screen_desktop))
+ dofocus = FALSE;
+
/* have to try focus here because when you leave an empty desktop
there is no focus out to watch for
do this before hiding the windows so if helper windows are coming
with us, they don't get hidden
*/
- if (dofocus
- && (!focus_client || (focus_client->desktop != DESKTOP_ALL
- && focus_client->desktop != num))
- && (c = focus_fallback(TRUE)))
+ if (dofocus && (c = focus_fallback(TRUE)))
{
/* only do the flicker reducing stuff ahead of time if we are going
to call xsetinputfocus on the window ourselves. otherwise there is