X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fclient.c;h=c7d03a826fa61c28e8bbd9452178586b4df69cf5;hb=0908816132ba2990c284696851566aae80a4ee01;hp=725416bb922d4a59e14e576f2b4a49375d245199;hpb=a2849a728df4e71443d74ea20a6823db28ba4396;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 725416bb..c7d03a82 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2289,7 +2289,7 @@ void client_set_desktop_recursive(ObClient *self, client_showhide(self); /* raise if it was not already on the desktop */ if (old != DESKTOP_ALL) - stacking_raise(CLIENT_AS_WINDOW(self)); + client_raise(self); screen_update_areas(); /* add to the new desktop(s) */ @@ -2492,7 +2492,7 @@ ObClient *client_focus_target(ObClient *self) ObClient *child; /* if we have a modal child, then focus it, not us */ - child = client_search_modal_child(self); + child = client_search_modal_child(client_search_top_transient(self)); if (child) return child; return self; } @@ -2602,7 +2602,7 @@ void client_activate(ObClient *self, gboolean here) if (client_normal(self) && screen_showing_desktop) screen_show_desktop(FALSE); if (self->iconic) - client_iconify(self, FALSE, FALSE); + client_iconify(self, FALSE, here); if (self->desktop != DESKTOP_ALL && self->desktop != screen_desktop) { if (here) @@ -2615,7 +2615,24 @@ void client_activate(ObClient *self, gboolean here) return; if (self->shaded) client_shade(self, FALSE); - action_run_string("Focus", self); + + client_focus(self); + + /* we do this an action here. this is rather important. this is because + we want the results from the focus change to take place BEFORE we go + about raising the window. when a fullscreen window loses focus, we need + this or else the raise wont be able to raise above the to-lose-focus + fullscreen window. */ + client_raise(self); +} + +void client_raise(ObClient *self) +{ + action_run_string("Raise", self); +} + +void client_lower(ObClient *self) +{ action_run_string("Raise", self); }