all repos — openbox @ b051b3499dc38e083d580fbedef70bdbbc9caa78

openbox fork - make it a bit more like ryudo

smarting picking for cycling to windows woth transients
Dana Jansens danakj@orodu.net
commit

b051b3499dc38e083d580fbedef70bdbbc9caa78

parent

f85c50bb4a7ea33e6e3733f3f58a35b62fd978ed

1 files changed, 22 insertions(+), 10 deletions(-)

jump to
M openbox/focus.copenbox/focus.c

@@ -504,16 +504,28 @@ /* we don't use client_can_focus here, because that doesn't let you

focus an iconic window, but we want to be able to, so we just check if the focus flags on the window allow it, and its on the current desktop */ - return ((ft->type == OB_CLIENT_TYPE_NORMAL || - ft->type == OB_CLIENT_TYPE_DIALOG || - (!client_has_group_siblings(ft) && - (ft->type == OB_CLIENT_TYPE_TOOLBAR || - ft->type == OB_CLIENT_TYPE_MENU || - ft->type == OB_CLIENT_TYPE_UTILITY))) && - !ft->transients && - ((ft->can_focus || ft->focus_notify) && - !ft->skip_taskbar && - (ft->desktop == screen_desktop || ft->desktop == DESKTOP_ALL))); + if ((ft->type == OB_CLIENT_TYPE_NORMAL || + ft->type == OB_CLIENT_TYPE_DIALOG || + (!client_has_group_siblings(ft) && + (ft->type == OB_CLIENT_TYPE_TOOLBAR || + ft->type == OB_CLIENT_TYPE_MENU || + ft->type == OB_CLIENT_TYPE_UTILITY))) && + ((ft->can_focus || ft->focus_notify) && + !ft->skip_taskbar && + (ft->desktop == screen_desktop || ft->desktop == DESKTOP_ALL))) + { + GSList *it; + + for (it = ft->transients; it; it = g_slist_next(it)) { + ObClient *c = it->data; + + if (c->frame->visible) + return FALSE; + } + return TRUE; + } + + return FALSE; } void focus_cycle(gboolean forward, gboolean linear,