compositor: map overlay window before redirecting windows
When windows get redirected off screen, all that gets left behind is black. We don't want to flicker black at startup, though. This commit maps the overlay window early, before redirecting toplevels, so they end up getting snapshotted onto the background pixmap of the overlay window when the overlay window is mapped. https://bugzilla.gnome.org/show_bug.cgi?id=694321
This commit is contained in:
parent
160150d127
commit
e15bc37225
@ -464,23 +464,16 @@ after_stage_paint (gpointer data)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
meta_compositor_manage_screen (MetaCompositor *compositor,
|
redirect_windows (MetaCompositor *compositor,
|
||||||
MetaScreen *screen)
|
MetaScreen *screen)
|
||||||
{
|
{
|
||||||
MetaCompScreen *info;
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
MetaDisplay *display = meta_screen_get_display (screen);
|
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
Window xroot = meta_screen_get_xroot (screen);
|
||||||
int screen_number = meta_screen_get_screen_number (screen);
|
int screen_number = meta_screen_get_screen_number (screen);
|
||||||
Window xroot = meta_screen_get_xroot (screen);
|
guint n_retries;
|
||||||
Window xwin;
|
guint max_retries;
|
||||||
gint width, height;
|
|
||||||
guint n_retries;
|
|
||||||
guint max_retries;
|
|
||||||
|
|
||||||
/* Check if the screen is already managed */
|
|
||||||
if (meta_screen_get_compositor_data (screen))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (meta_get_replace_current_wm ())
|
if (meta_get_replace_current_wm ())
|
||||||
max_retries = 5;
|
max_retries = 5;
|
||||||
@ -513,6 +506,21 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
|||||||
n_retries++;
|
n_retries++;
|
||||||
g_usleep (G_USEC_PER_SEC);
|
g_usleep (G_USEC_PER_SEC);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||||
|
MetaScreen *screen)
|
||||||
|
{
|
||||||
|
MetaCompScreen *info;
|
||||||
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
|
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||||
|
Window xwin;
|
||||||
|
gint width, height;
|
||||||
|
|
||||||
|
/* Check if the screen is already managed */
|
||||||
|
if (meta_screen_get_compositor_data (screen))
|
||||||
|
return;
|
||||||
|
|
||||||
info = g_new0 (MetaCompScreen, 1);
|
info = g_new0 (MetaCompScreen, 1);
|
||||||
/*
|
/*
|
||||||
@ -611,6 +619,13 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
clutter_actor_show (info->overlay_group);
|
clutter_actor_show (info->overlay_group);
|
||||||
|
|
||||||
|
/* Map overlay window before redirecting windows offscreen so we catch their
|
||||||
|
* contents until we show the stage.
|
||||||
|
*/
|
||||||
|
XMapWindow (xdisplay, info->output);
|
||||||
|
|
||||||
|
redirect_windows (compositor, screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user