X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fstacking.c;h=4c24e3e87f06ed2414006f41abe266e3872ba7a9;hb=ba1ac214dfdbc0539c922e84c2318c1bf2566c0c;hp=63819ae254bc19075d26ecad1efe9fd2dec8c7aa;hpb=3febcbb9ae6a31edbd64a86f0045148bb052fcff;p=chaz%2Fopenbox diff --git a/openbox/stacking.c b/openbox/stacking.c index 63819ae2..4c24e3e8 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -25,6 +25,7 @@ #include "group.h" #include "frame.h" #include "window.h" +#include "event.h" #include "debug.h" GList *stacking_list = NULL; @@ -220,6 +221,15 @@ static void restack_windows(ObClient *selected, gboolean raise) GList *modals = NULL; GList *trans = NULL; + if (raise) { + ObClient *p; + + /* if a window is modal for another single window, then raise it to the + top too, the same is done with the focus order */ + while (selected->modal && (p = client_direct_parent(selected))) + selected = p; + } + /* remove first so we can't run into ourself */ it = g_list_find(stacking_list, selected); g_assert(it);