summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xquartz/X11Application.m4
-rw-r--r--hw/xquartz/X11Controller.m3
-rw-r--r--hw/xquartz/darwin.c7
-rw-r--r--hw/xquartz/xpr/xprFrame.c4
-rw-r--r--miext/rootless/rootlessCommon.h2
-rw-r--r--miext/rootless/rootlessWindow.c2
6 files changed, 11 insertions, 11 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 4ac977a7d..ef5f0249f 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -674,10 +674,6 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) {
darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH
default:darwinDesiredDepth];
-
- // TODO: Add 256 color support
- if(darwinDesiredDepth == 8)
- darwinDesiredDepth = -1;
// enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO
// default:false];
diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
index e1a2856fe..e06747596 100644
--- a/hw/xquartz/X11Controller.m
+++ b/hw/xquartz/X11Controller.m
@@ -657,9 +657,6 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
[enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]];
[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];
// TODO: Add fullscreen support
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index b26110612..0a950359e 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -218,6 +218,13 @@ static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv)
dfb->greenMask, dfb->blueMask)) {
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();
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index c8cbc22d8..7c143b8a8 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -119,11 +119,9 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
if (pWin->drawable.depth == 8)
{
wc.depth = XP_DEPTH_INDEX8;
-#if 0
- wc.colormap = xprColormapCallback;
+ wc.colormap = RootlessColormapCallback;
wc.colormap_data = pScreen;
mask |= XP_COLORMAP;
-#endif
}
else if (pWin->drawable.depth == 15)
wc.depth = XP_DEPTH_RGB555;
diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index 56f81f5d5..3d338910f 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -273,6 +273,8 @@ Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color,
void RootlessFlushWindowColormap (WindowPtr pWin);
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.
void RootlessRepositionWindow(WindowPtr pWin);
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index ff773ef2d..c0554f4de 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -448,7 +448,7 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec)
Bool
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);
}
/*