X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fstacking.c;h=4c24e3e87f06ed2414006f41abe266e3872ba7a9;hb=a19f2f8bc9964b89a500a2c5aac0b8d3a3dc2ff4;hp=92a5285d79f3a1ec22882868bbccd136fa5a7675;hpb=751f85003f080d79baa2d4b3b989b12a0ee9d469;p=chaz%2Fopenbox diff --git a/openbox/stacking.c b/openbox/stacking.c index 92a5285d..4c24e3e8 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);