From ddcbd8234b8fd78b8736a2cbeacc6c4769e83c22 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 11 Apr 2011 17:49:18 +0200 Subject: [PATCH] [broadway] When resyncing, first create all windows then set attributes Some attributes (like transient parent) depende on other windows being there, so we create all first. --- gdk/broadway/gdkwindow-broadway.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c index 1cd5425596..34a1ae6631 100644 --- a/gdk/broadway/gdkwindow-broadway.c +++ b/gdk/broadway/gdkwindow-broadway.c @@ -208,6 +208,7 @@ _gdk_broadway_resync_windows (void) display = GDK_BROADWAY_DISPLAY (gdk_display_get_default ()); + /* First create all windows */ for (l = display->toplevels; l != NULL; l = l->next) { GdkWindowImplBroadway *impl = l->data; @@ -227,6 +228,16 @@ _gdk_broadway_resync_windows (void) window->width, window->height, window->window_type == GDK_WINDOW_TEMP); + } + + /* Then do everything that may reference other windows */ + for (l = display->toplevels; l != NULL; l = l->next) + { + GdkWindowImplBroadway *impl = l->data; + + if (impl->id == 0) + continue; /* Skip root */ + if (impl->transient_for) broadway_output_set_transient_for (display->output, impl->id, impl->transient_for); /* Can't check GDK_WINDOW_IS_MAPPED here, because that doesn't correctly handle