X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=c2d7e11e5dd879d8a776fd7bfb65ce0524d1d3db;hb=cd3aa44b6a78e84e75420d6cca2c32f117a096a4;hp=df02cb7630bf7c9bff8dbc38f385437ba7f4db37;hpb=556eb7b7fb20b3b0db03b6d92259ad3bb16dccde;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index df02cb76..c2d7e11e 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -57,6 +57,14 @@ void focus_shutdown(gboolean reconfig) static void push_to_top(ObClient *client) { + ObClient *p; + + /* if it is modal for a single window, then put that window at the top + of the focus order first, so it will be right after ours. the same is + done with stacking */ + if (client->modal && (p = client_direct_parent(client))) + push_to_top(p); + focus_order = g_list_remove(focus_order, client); focus_order = g_list_prepend(focus_order, client); } @@ -337,13 +345,9 @@ gboolean focus_valid_target(ObClient *ft, that can be focused instead */ !focus_target_has_siblings(ft, iconic_windows, all_desktops)))); - /* it's not set to skip the taskbar (unless it is a type that would be - expected to set this hint, or modal) */ - ok = ok && ((ft->type == OB_CLIENT_TYPE_DOCK || - ft->type == OB_CLIENT_TYPE_DESKTOP || - ft->type == OB_CLIENT_TYPE_TOOLBAR || - ft->type == OB_CLIENT_TYPE_MENU || - ft->type == OB_CLIENT_TYPE_UTILITY) || + /* it's not set to skip the taskbar (but this only applies to normal typed + windows, and is overridden if the window is modal) */ + ok = ok && (ft->type != OB_CLIENT_TYPE_NORMAL || ft->modal || !ft->skip_taskbar);