XQuartz: 256 color support
(cherry picked from commit 8dd6d5c825d457f26b41b79d02d57ed4a5ecf1f5)
This commit is contained in:
parent
bad7cd14c2
commit
6548a55ebd
|
@ -674,10 +674,6 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
|
||||||
|
|
||||||
darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
|
darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
|
||||||
default:darwinDesiredDepth];
|
default:darwinDesiredDepth];
|
||||||
|
|
||||||
// TODO: Add 256 color support
|
|
||||||
if(darwinDesiredDepth == 8)
|
|
||||||
darwinDesiredDepth = -1;
|
|
||||||
|
|
||||||
// enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO
|
// enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO
|
||||||
// default:false];
|
// default:false];
|
||||||
|
|
|
@ -657,9 +657,6 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
|
||||||
[enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
|
[enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
|
||||||
|
|
||||||
[depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
|
[depth selectItemAtIndex:[depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]];
|
||||||
// TODO: Add 256 color support
|
|
||||||
if([depth indexOfItemWithTag:8] != -1)
|
|
||||||
[depth removeItemAtIndex:[depth indexOfItemWithTag:8]];
|
|
||||||
|
|
||||||
[enable_fullscreen setIntValue:!quartzEnableRootless];
|
[enable_fullscreen setIntValue:!quartzEnableRootless];
|
||||||
// TODO: Add fullscreen support
|
// TODO: Add fullscreen support
|
||||||
|
|
|
@ -218,6 +218,13 @@ static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv)
|
||||||
dfb->greenMask, dfb->blueMask)) {
|
dfb->greenMask, dfb->blueMask)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(dfb->depth > 8)
|
||||||
|
miSetVisualTypesAndMasks(8, PseudoColorMask, 8, PseudoColor, 0, 0, 0);
|
||||||
|
if(dfb->depth > 15)
|
||||||
|
miSetVisualTypesAndMasks(15, LARGE_VISUALS, 5, TrueColor, 0x7c00, 0x03e0, 0x001f);
|
||||||
|
if(dfb->depth > 24)
|
||||||
|
miSetVisualTypesAndMasks(24, LARGE_VISUALS, 8, TrueColor, 0x00ff0000, 0x0000ff00, 0x000000ff);
|
||||||
|
|
||||||
miSetPixmapDepths();
|
miSetPixmapDepths();
|
||||||
|
|
||||||
|
|
|
@ -119,11 +119,9 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
|
||||||
if (pWin->drawable.depth == 8)
|
if (pWin->drawable.depth == 8)
|
||||||
{
|
{
|
||||||
wc.depth = XP_DEPTH_INDEX8;
|
wc.depth = XP_DEPTH_INDEX8;
|
||||||
#if 0
|
wc.colormap = RootlessColormapCallback;
|
||||||
wc.colormap = xprColormapCallback;
|
|
||||||
wc.colormap_data = pScreen;
|
wc.colormap_data = pScreen;
|
||||||
mask |= XP_COLORMAP;
|
mask |= XP_COLORMAP;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else if (pWin->drawable.depth == 15)
|
else if (pWin->drawable.depth == 15)
|
||||||
wc.depth = XP_DEPTH_RGB555;
|
wc.depth = XP_DEPTH_RGB555;
|
||||||
|
|
|
@ -273,6 +273,8 @@ Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color,
|
||||||
void RootlessFlushWindowColormap (WindowPtr pWin);
|
void RootlessFlushWindowColormap (WindowPtr pWin);
|
||||||
void RootlessFlushScreenColormaps (ScreenPtr pScreen);
|
void RootlessFlushScreenColormaps (ScreenPtr pScreen);
|
||||||
|
|
||||||
|
RootlessColormapCallback(void *data, int first_color, int n_colors, uint32_t *colors);
|
||||||
|
|
||||||
// Move a window to its proper location on the screen.
|
// Move a window to its proper location on the screen.
|
||||||
void RootlessRepositionWindow(WindowPtr pWin);
|
void RootlessRepositionWindow(WindowPtr pWin);
|
||||||
|
|
||||||
|
|
|
@ -448,7 +448,7 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec)
|
||||||
Bool
|
Bool
|
||||||
RootlessColormapCallback (void *data, int first_color, int n_colors, uint32_t *colors)
|
RootlessColormapCallback (void *data, int first_color, int n_colors, uint32_t *colors)
|
||||||
{
|
{
|
||||||
return RootlessResolveColormap (data, first_color, n_colors, colors);
|
return (RootlessResolveColormap (data, first_color, n_colors, colors) ? XP_Success : XP_BadMatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue