(user_time != 0) &&
/* this checks for focus=false for the window */
(!settings || settings->focus != 0) &&
- focus_valid_target(self, FALSE, FALSE, TRUE, FALSE, FALSE))
+ focus_valid_target(self, FALSE, FALSE, TRUE, FALSE, FALSE,
+ settings->focus == 1))
{
activate = TRUE;
}
3. it is not shaded
*/
if ((allow_omnipresent || c->desktop == screen_desktop) &&
- focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, FALSE) &&
+ focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE) &&
!c->shaded &&
(allow_refocus || client_focus_target(c) != old) &&
client_focus(c))
a splashscreen or a desktop window (save the desktop as a
backup fallback though)
*/
- if (focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, TRUE) &&
+ if (focus_valid_target(c, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE) &&
(allow_refocus || client_focus_target(c) != old) &&
client_focus(c))
{
/* check that it's not a helper window to avoid infinite recursion */
if (c != ft && c->type == OB_CLIENT_TYPE_NORMAL &&
focus_valid_target(c, TRUE, iconic_windows, all_desktops,
- FALSE, FALSE))
+ FALSE, FALSE, FALSE))
{
return TRUE;
}
gboolean iconic_windows,
gboolean all_desktops,
gboolean dock_windows,
- gboolean desktop_windows)
+ gboolean desktop_windows,
+ gboolean user_request)
{
gboolean ok = FALSE;
!focus_target_has_siblings(ft, iconic_windows, all_desktops))));
/* it's not set to skip the taskbar (but this only applies to normal typed
- windows, and is overridden if the window is modal) */
+ windows, and is overridden if the window is modal or if the user asked
+ for this window to be focused) */
ok = ok && (ft->type != OB_CLIENT_TYPE_NORMAL ||
ft->modal ||
+ user_request ||
!ft->skip_taskbar);
/* it's not going to just send focus off somewhere else (modal window),
iconic_windows,
all_desktops,
dock_windows,
- desktop_windows));
+ desktop_windows,
+ FALSE));
}
return ok;
gboolean iconic_windows,
gboolean all_desktops,
gboolean dock_windows,
- gboolean desktop_windows);
+ gboolean desktop_windows,
+ gboolean user_request);
#endif
focus_cycle_iconic_windows,
focus_cycle_all_desktops,
focus_cycle_dock_windows,
- focus_cycle_desktop_windows))
+ focus_cycle_desktop_windows,
+ FALSE))
{
focus_cycle(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,TRUE);
focus_directional_cycle(0, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE);
focus_cycle_iconic_windows,
focus_cycle_all_desktops,
focus_cycle_dock_windows,
- focus_cycle_desktop_windows))
+ focus_cycle_desktop_windows,
+ FALSE))
{
if (interactive) {
if (ft != focus_cycle_target) { /* prevents flicker */
if (cur == c)
continue;
if (!focus_valid_target(it->data, TRUE, FALSE, FALSE, dock_windows,
- desktop_windows))
+ desktop_windows, FALSE))
continue;
/* find the centre coords of this window, from the
focus_cycle_iconic_windows,
focus_cycle_all_desktops,
focus_cycle_dock_windows,
- focus_cycle_desktop_windows))
+ focus_cycle_desktop_windows, FALSE))
ft = it->data;
}
iconic_windows,
all_desktops,
dock_windows,
- desktop_windows))
+ desktop_windows,
+ FALSE))
{
gchar *text = popup_get_name(ft);