X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=inline;f=openbox%2Fstacking.c;h=2a34f71dc4eea10305c1037a0ae24b64d9d4025b;hb=2f09e0ce388f63c341cb328d795766e2bd0dc24b;hp=03a62dd4413bdc536b2ed0589f71e21fdc4252dc;hpb=a21840cbb7912c25abc1943c08d6980da7537a6c;p=chaz%2Fopenbox diff --git a/openbox/stacking.c b/openbox/stacking.c index 03a62dd4..2a34f71d 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -69,6 +69,8 @@ static void do_restack(GList *wins, GList *before) #ifdef DEBUG GList *next; + + g_assert(wins); /* pls only restack stuff in the same layer at a time */ for (it = wins; it; it = next) { next = g_list_next(it); @@ -221,6 +223,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);