[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.
This commit is contained in:
Alexander Larsson 2011-04-11 17:49:18 +02:00
parent 4bbc45380b
commit ddcbd8234b

View File

@ -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