diff --git a/src/compositor/compositor-private.h b/src/compositor/compositor-private.h index 07fbf5119..821f1dff0 100644 --- a/src/compositor/compositor-private.h +++ b/src/compositor/compositor-private.h @@ -74,4 +74,6 @@ MetaInhibitShortcutsDialog * meta_compositor_create_inhibit_shortcuts_dialog (Me void meta_compositor_locate_pointer (MetaCompositor *compositor); +void meta_compositor_redirect_x11_windows (MetaCompositor *compositor); + #endif /* META_COMPOSITOR_PRIVATE_H */ diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index aae717789..cbb0ab6df 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -516,6 +516,15 @@ redirect_windows (MetaX11Display *x11_display) } } +void +meta_compositor_redirect_x11_windows (MetaCompositor *compositor) +{ + MetaDisplay *display = compositor->display; + + if (display->x11_display) + redirect_windows (display->x11_display); +} + void meta_compositor_manage (MetaCompositor *compositor) { @@ -595,8 +604,7 @@ meta_compositor_manage (MetaCompositor *compositor) compositor->have_x11_sync_object = meta_sync_ring_init (xdisplay); } - if (display->x11_display) - redirect_windows (display->x11_display); + meta_compositor_redirect_x11_windows (compositor); compositor->plugin_mgr = meta_plugin_manager_new (compositor); } diff --git a/src/core/display.c b/src/core/display.c index af10f7b27..bd7f10b6d 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -648,6 +648,8 @@ meta_display_init_x11 (MetaDisplay *display, if (!display->display_opening) meta_display_manage_all_xwindows (display); + meta_compositor_redirect_x11_windows (display->compositor); + return TRUE; }