From f78390b094ebfede5a1a30a59adcf7b8b2ff9cd4 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 18 Mar 2009 15:09:15 -0400 Subject: [PATCH] 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 --- src/core/window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index 94be7a5c4..b65ca61e0 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -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; }