mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
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,24 +464,17 @@ after_stage_paint (gpointer data)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
static void
|
||||
redirect_windows (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
MetaCompScreen *info;
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
int screen_number = meta_screen_get_screen_number (screen);
|
||||
Window xroot = meta_screen_get_xroot (screen);
|
||||
Window xwin;
|
||||
gint width, height;
|
||||
int screen_number = meta_screen_get_screen_number (screen);
|
||||
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 ())
|
||||
max_retries = 5;
|
||||
else
|
||||
@ -513,6 +506,21 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
n_retries++;
|
||||
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);
|
||||
/*
|
||||
@ -611,6 +619,13 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
}
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user