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
* 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
* below comes from the detail that the size of a colormap is limited to
* 15bits.
* have to allocate space in the file for the colormap. The number 10
* below comes from the MAX_PSEUDO_DEPTH define in cfbcmap.c.
*/
if (pvfb->depth <= 15)
if (pvfb->depth <= 10)
{ /* single index colormaps */
pvfb->ncolors = 1 << pvfb->depth;
}
@ -908,9 +907,7 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
#endif
case 15:
miSetVisualTypesAndMasks (15,
((1 << GrayScale) |
(1 << PseudoColor) |
(1 << TrueColor) |
((1 << TrueColor) |
(1 << DirectColor)),
8, TrueColor, 0x7c00, 0x03e0, 0x001f);
break;