X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=7c15891a60e416d39910c0706c8498a9c911b9ff;hb=26cc41f6c6187dabd5c7ee4365c8fa44751009e5;hp=68b0b7f90ecba6f07061939b4c847fef99b4b3ce;hpb=0dc7eca4cdfff6425e19a0bace0f9ae8834d04e8;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index 68b0b7f9..7c15891a 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); } @@ -188,13 +196,6 @@ void focus_nothing(void) /* nothing is focused, update the colormap and _the root property_ */ focus_set_client(NULL); - /* if there is a grab going on, then we need to cancel it. if we move - focus during the grab, applications will get NotifyWhileGrabbed events - and ignore them ! - - actions should not rely on being able to move focus during an - interactive grab. - */ event_cancel_all_key_grabs(); /* when nothing will be focused, send focus to the backup target */