Fix Xvfb to work properly in depth 15 mode. Fixes XTS5 XCloseDisplay-3

server crash.
This commit is contained in:
Kevin E Martin 2005-11-07 21:03:49 +00:00
parent 890ed0e082
commit e73cdba865

View File

@ -698,12 +698,11 @@ vfbAllocateFramebufferMemory(vfbScreenInfoPtr pvfb)
/* Calculate how many entries in colormap. This is rather bogus, because /* Calculate how many entries in colormap. This is rather bogus, because
* the visuals haven't even been set up yet, but we need to know because we * the visuals haven't even been set up yet, but we need to know because we
* have to allocate space in the file for the colormap. The number 15 * have to allocate space in the file for the colormap. The number 10
* below comes from the detail that the size of a colormap is limited to * below comes from the MAX_PSEUDO_DEPTH define in cfbcmap.c.
* 15bits.
*/ */
if (pvfb->depth <= 15) if (pvfb->depth <= 10)
{ /* single index colormaps */ { /* single index colormaps */
pvfb->ncolors = 1 << pvfb->depth; pvfb->ncolors = 1 << pvfb->depth;
} }
@ -908,9 +907,7 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
#endif #endif
case 15: case 15:
miSetVisualTypesAndMasks (15, miSetVisualTypesAndMasks (15,
((1 << GrayScale) | ((1 << TrueColor) |
(1 << PseudoColor) |
(1 << TrueColor) |
(1 << DirectColor)), (1 << DirectColor)),
8, TrueColor, 0x7c00, 0x03e0, 0x001f); 8, TrueColor, 0x7c00, 0x03e0, 0x001f);
break; break;