X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fstacking.c;h=3c05df49c64c0c23f470a87aa4e090ee33fb4d29;hb=4b5373f609e6462995a38cc4f0f50b17cbc8f835;hp=03a62dd4413bdc536b2ed0589f71e21fdc4252dc;hpb=5563e251c36a1fbda703cf4bc3c8c6ae543829bd;p=chaz%2Fopenbox diff --git a/openbox/stacking.c b/openbox/stacking.c index 03a62dd4..3c05df49 100644 --- a/openbox/stacking.c +++ b/openbox/stacking.c @@ -221,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);