From 5e7936371c9e1ac48e19bf1e9e3f71f037fd9b5d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 26 Mar 2007 20:18:18 -0700 Subject: Disable Composite when the screen's visual is pseudocolor. Rendering fails badly in this case, and I don't care enough to fix it. --- composite/compext.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'composite/compext.c') diff --git a/composite/compext.c b/composite/compext.c index 3a9f896df..af05b4a65 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -678,9 +678,22 @@ CompositeExtensionInit (void) ExtensionEntry *extEntry; int s; - /* Ensure that Render is initialized on all screens. */ for (s = 0; s < screenInfo.numScreens; s++) { - if (GetPictureScreenIfSet(screenInfo.screens[s]) == NULL) + ScreenPtr pScreen = screenInfo.screens[s]; + VisualPtr vis; + + /* Composite on 8bpp pseudocolor root windows appears to fail, so + * just disable it on anything pseudocolor for safety. + */ + for (vis = pScreen->visuals; vis->vid != pScreen->rootVisual; vis++) + ; + if ((vis->class | DynamicClass) == PseudoColor) + return; + + /* Ensure that Render is initialized, which is required for automatic + * compositing. + */ + if (GetPictureScreenIfSet(pScreen) == NULL) return; } -- cgit v1.2.3