115cc5d8ad
- xserver-1.3.0-pci-bus-count.patch: Allocate the PCI bus array dynamically, so as not to run off the end of it. - xserver-1.3.0-mmap-failure-check.patch: Check for failure when mmap'ing bus memory. (#234073) - xserver-1.3.0-rom-search.patch: Look for the sysfs ROM file in the (flat) /sys/bus/pci/devices tree, instead of the (bus-topological) /sys/devices, so we don't fail to find ROMs merely because they're behind a bridge. - xserver-1.3.0-no-pseudocolor-composite.patch: Refuse to initialize Composite when Render is missing or when the root window is using a pseudocolor visual. (#217388) - xserver-1.3.0-xnest-exposures.patch: Fix Motif app redraw in Xnest. (#229350)
31 lines
926 B
Diff
31 lines
926 B
Diff
diff --git a/composite/compext.c b/composite/compext.c
|
|
index 4c25cc7..af05b4a 100644
|
|
--- a/composite/compext.c
|
|
+++ b/composite/compext.c
|
|
@@ -678,6 +678,25 @@ CompositeExtensionInit (void)
|
|
ExtensionEntry *extEntry;
|
|
int s;
|
|
|
|
+ for (s = 0; s < screenInfo.numScreens; s++) {
|
|
+ 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;
|
|
+ }
|
|
+
|
|
CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow);
|
|
if (!CompositeClientWindowType)
|
|
return;
|