If enabling a compositor with existing windows, set them visible as necessary

When a compositor is present, we keep the visibility state of the
compositor windows in sync with window->visible_to_compositor. We need
to do the same when enabling the compositor.

https://bugzilla.gnome.org/show_bug.cgi?id=613124
This commit is contained in:
Owen W. Taylor 2010-08-17 15:02:07 -04:00
parent d3df33ecdb
commit 78092a404f

View File

@ -978,7 +978,15 @@ meta_screen_composite_all_windows (MetaScreen *screen)
windows = meta_display_list_windows (display, windows = meta_display_list_windows (display,
META_LIST_INCLUDE_OVERRIDE_REDIRECT); META_LIST_INCLUDE_OVERRIDE_REDIRECT);
for (tmp = windows; tmp != NULL; tmp = tmp->next) for (tmp = windows; tmp != NULL; tmp = tmp->next)
meta_compositor_add_window (display->compositor, tmp->data); {
MetaWindow *window = tmp->data;
meta_compositor_add_window (display->compositor, window);
if (window->visible_to_compositor)
meta_compositor_show_window (display->compositor, window,
META_COMP_EFFECT_NONE);
}
g_slist_free (windows); g_slist_free (windows);
/* initialize the compositor's view of the stacking order */ /* initialize the compositor's view of the stacking order */