X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=cff81bfb03918a0b5fe0e982cd5bedbea17d7e97;hb=3263845459d15da683b7cab92fb856acbdf2800e;hp=68b0b7f90ecba6f07061939b4c847fef99b4b3ce;hpb=5563e251c36a1fbda703cf4bc3c8c6ae543829bd;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index 68b0b7f9..cff81bfb 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); }