X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fstacking.c;h=3c05df49c64c0c23f470a87aa4e090ee33fb4d29;hb=5f04ca85ef6a2ebc2d66842e261a676691e9b4de;hp=03a62dd4413bdc536b2ed0589f71e21fdc4252dc;hpb=4435c3a438f092252f563d5fd97dffd440a164db;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);