mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Disable Composite when the screen's visual is pseudocolor.
Rendering fails badly in this case, and I don't care enough to fix it.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user