diff options
Diffstat (limited to 'composite/compext.c')
-rw-r--r-- | composite/compext.c | 17 |
1 files changed, 15 insertions, 2 deletions
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; } |