Notify the compositor of new windows slightly sooner.

In particular, make it so that we call meta_compositor_add_window() on
a new window before calling meta_compositor_sync_stack() to position
it. The list returned by mutter_plugin_get_windows() is only updated
by sync_stack(), but sync_stack() only pays attention to windows that
add_window() has already been called on. So without this change, a
newly-mapped window will not be returned by
mutter_plugin_get_windows() until after the *next* restacking.

http://bugzilla.openedhand.com/show_bug.cgi?id=1512
This commit is contained in:
Dan Winship 2009-03-18 15:09:15 -04:00
parent 0b635aafae
commit f78390b094

View File

@ -1014,6 +1014,9 @@ meta_window_new_with_attrs (MetaDisplay *display,
set_net_wm_state (window);
}
if (screen->display->compositor)
meta_compositor_add_window (screen->display->compositor, window);
/* Sync stack changes */
meta_stack_thaw (window->screen->stack);
@ -1045,9 +1048,6 @@ meta_window_new_with_attrs (MetaDisplay *display,
window->constructing = FALSE;
if (screen->display->compositor)
meta_compositor_add_window (screen->display->compositor, window);
return window;
}