diff --git a/src/compositor/mutter/compositor-mutter.c b/src/compositor/mutter/compositor-mutter.c index a618b172b..5981f0c7f 100644 --- a/src/compositor/mutter/compositor-mutter.c +++ b/src/compositor/mutter/compositor-mutter.c @@ -1863,15 +1863,12 @@ clutter_cmp_manage_screen (MetaCompositor *compositor, meta_screen_set_compositor_data (screen, info); - info->output = get_output_window (screen); - + info->output = None; info->windows = NULL; info->windows_by_xid = g_hash_table_new (g_direct_hash, g_direct_equal); info->focus_window = meta_display_get_focus_window (display); - XClearArea (xdisplay, info->output, 0, 0, 0, 0, TRUE); - meta_screen_set_cm_selection (screen); info->stage = clutter_stage_get_default (); @@ -1881,8 +1878,6 @@ clutter_cmp_manage_screen (MetaCompositor *compositor, xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage)); - XReparentWindow (xdisplay, xwin, info->output, 0, 0); - event_mask = FocusChangeMask | ExposureMask | PointerMotionMask | @@ -1910,17 +1905,23 @@ clutter_cmp_manage_screen (MetaCompositor *compositor, clutter_actor_hide (info->hidden_group); - /* - * Must do this *before* creating the plugin manager, in case any of the - * plugins need to adjust the screen shape regions. - */ - show_overlay_window (xdisplay, xwin, info->output); - info->plugin_mgr = mutter_plugin_manager_new (screen); - clutter_actor_show (info->stage); + /* + * Delay the creation of the overlay window as long as we can, to avoid + * blanking out the screen. This means that during the plugin loading, the + * overlay window is not accessible, and so the plugins cannot do stuff + * like changing input shape; if that is required, the plugin should hook into + * "show" signal on stage, and do its stuff there. + */ + info->output = get_output_window (screen); + XReparentWindow (xdisplay, xwin, info->output, 0, 0); + + show_overlay_window (xdisplay, xwin, info->output); + clutter_actor_show (info->overlay_group); + clutter_actor_show (info->stage); #endif }