X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;fp=openbox%2Ffocus.c;h=c2d7e11e5dd879d8a776fd7bfb65ce0524d1d3db;hb=a19f2f8bc9964b89a500a2c5aac0b8d3a3dc2ff4;hp=a4eb2cfa32a76b000c16d6f7d2160519382ed49a;hpb=751f85003f080d79baa2d4b3b989b12a0ee9d469;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index a4eb2cfa..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); }