Fixed DirectColor visual window creation problem
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403407
This commit is contained in:
parent
1b7ca906c0
commit
2184f43b1c
3 changed files with 10 additions and 9 deletions
|
@ -212,7 +212,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
|||
xattr.background_pixel = 0;
|
||||
xattr.border_pixel = 0;
|
||||
|
||||
if (visual->class == DirectColor || visual->class == PseudoColor) {
|
||||
if (visual->class == PseudoColor) {
|
||||
int nmaps;
|
||||
XStandardColormap cmap;
|
||||
XStandardColormap *stdmaps;
|
||||
|
@ -299,6 +299,12 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
|||
X11_TrackColormap(data->display, displaydata->screen, colormap,
|
||||
&cmap, visual);
|
||||
}
|
||||
} else if (visual->class == DirectColor) {
|
||||
/* FIXME: Allocate a read-write colormap for gamma fading someday */
|
||||
xattr.colormap =
|
||||
XCreateColormap(data->display,
|
||||
RootWindow(data->display, displaydata->screen),
|
||||
visual, AllocNone);
|
||||
} else {
|
||||
xattr.colormap =
|
||||
XCreateColormap(data->display,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue