From cdb405dfcf0c91bb2c6987617dfc9c1191119539 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 19 Jan 2009 14:56:30 +0100 Subject: [PATCH] Restack native window after reparent put it on top --- gdk/gdkwindow.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 1b61a153da..50cc817aa8 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -1162,7 +1162,23 @@ gdk_window_reparent (GdkWindow *window, if (do_reparent_to_impl) reparent_to_impl (private); - + else + { + GdkWindowObject *above; + GList listhead = {0}; + + /* The reparent will have put the native window topmost in the native parent, + * which may be wrong wrt other native windows in the non-native hierarchy, + * so restack */ + above = find_native_sibling_above (private->parent, private); + if (above) + { + listhead.data = window; + GDK_WINDOW_IMPL_GET_IFACE (private->impl)->restack_under ((GdkWindow *)above, + &listhead); + } + } + if (show) gdk_window_show_unraised (window); else