comparison src/video/x11/SDL_x11window.c @ 2945:e38423786728

Fixed DirectColor visual window creation problem
author Sam Lantinga <slouken@libsdl.org>
date Thu, 01 Jan 2009 18:58:26 +0000
parents 1e431c2631ee
children e4a469d6ddab
comparison
equal deleted inserted replaced
2944:7dac01628a8b 2945:e38423786728
210 xattr.override_redirect = False; 210 xattr.override_redirect = False;
211 } 211 }
212 xattr.background_pixel = 0; 212 xattr.background_pixel = 0;
213 xattr.border_pixel = 0; 213 xattr.border_pixel = 0;
214 214
215 if (visual->class == DirectColor || visual->class == PseudoColor) { 215 if (visual->class == PseudoColor) {
216 int nmaps; 216 int nmaps;
217 XStandardColormap cmap; 217 XStandardColormap cmap;
218 XStandardColormap *stdmaps; 218 XStandardColormap *stdmaps;
219 XColor *colorcells; 219 XColor *colorcells;
220 Colormap colormap; 220 Colormap colormap;
297 297
298 xattr.colormap = colormap; 298 xattr.colormap = colormap;
299 X11_TrackColormap(data->display, displaydata->screen, colormap, 299 X11_TrackColormap(data->display, displaydata->screen, colormap,
300 &cmap, visual); 300 &cmap, visual);
301 } 301 }
302 } else if (visual->class == DirectColor) {
303 /* FIXME: Allocate a read-write colormap for gamma fading someday */
304 xattr.colormap =
305 XCreateColormap(data->display,
306 RootWindow(data->display, displaydata->screen),
307 visual, AllocNone);
302 } else { 308 } else {
303 xattr.colormap = 309 xattr.colormap =
304 XCreateColormap(data->display, 310 XCreateColormap(data->display,
305 RootWindow(data->display, displaydata->screen), 311 RootWindow(data->display, displaydata->screen),
306 visual, AllocNone); 312 visual, AllocNone);