Only uncomposite the screen if there is a compositor.

Fri Feb 17 11:56:35 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/screen.c (meta_screen_free): Only uncomposite the screen if
	there is a compositor.

	* src/compositor.c (meta_compositor_new): Warn and fail if the
	server doesn't have composite
This commit is contained in:
Søren Sandmann 2006-02-17 16:58:08 +00:00 committed by Søren Sandmann Pedersen
parent 71b27c6228
commit f3ade45b96
3 changed files with 34 additions and 3 deletions

View File

@ -1,3 +1,11 @@
Fri Feb 17 11:56:35 2006 Søren Sandmann <sandmann@redhat.com>
* src/screen.c (meta_screen_free): Only uncomposite the screen if
there is a compositor.
* src/compositor.c (meta_compositor_new): Warn and fail if the
server doesn't have composite
Thu Feb 16 18:57:48 2006 Søren Sandmann <sandmann@redhat.com>
* src/compositor.c: Fix the build when --enable-compositor is

View File

@ -101,7 +101,27 @@ meta_compositor_new (MetaDisplay *display)
compositor = g_new0 (MetaCompositor, 1);
if (!compositor_display)
compositor_display = ws_display_new (NULL);
{
gboolean has_extensions;
compositor_display = ws_display_new (NULL);
has_extensions =
ws_display_init_composite (compositor_display) &&
ws_display_init_damage (compositor_display) &&
ws_display_init_fixes (compositor_display) &&
ws_display_init_test (compositor_display);
if (!has_extensions)
{
g_warning ("Disabling compositor since the server is missing at "
"least one of the COMPOSITE, DAMAGE, FIXES or TEST "
"extensions");
return NULL;
}
}
compositor->display = compositor_display;
ws_display_set_synchronize (compositor_display,

View File

@ -665,8 +665,11 @@ meta_screen_free (MetaScreen *screen)
meta_display_grab (display);
meta_compositor_unmanage_screen (screen->display->compositor,
screen);
if (screen->display->compositor)
{
meta_compositor_unmanage_screen (screen->display->compositor,
screen);
}
meta_display_unmanage_windows_for_screen (display, screen);