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
1
TODO
1
TODO
|
@ -7,7 +7,6 @@
|
||||||
* Implement icon support (with translucency?)
|
* Implement icon support (with translucency?)
|
||||||
* Add diagonal line clipping to SDL_IntersectRectAndLine()
|
* Add diagonal line clipping to SDL_IntersectRectAndLine()
|
||||||
* Add OpenGL 3.0 context support
|
* Add OpenGL 3.0 context support
|
||||||
* Have Bob look at why DirectColor visuals fail with XA_RGB_BEST_MAP error
|
|
||||||
* Verify mouse grab support
|
* Verify mouse grab support
|
||||||
* Properly handle mouse grab with Vista DPI scaling
|
* Properly handle mouse grab with Vista DPI scaling
|
||||||
* Make sure the mouse is where it's supposed to be when un-grabbed
|
* Make sure the mouse is where it's supposed to be when un-grabbed
|
||||||
|
|
|
@ -32,13 +32,9 @@ static int
|
||||||
get_visualinfo(Display * display, int screen, XVisualInfo * vinfo)
|
get_visualinfo(Display * display, int screen, XVisualInfo * vinfo)
|
||||||
{
|
{
|
||||||
const char *visual_id = SDL_getenv("SDL_VIDEO_X11_VISUALID");
|
const char *visual_id = SDL_getenv("SDL_VIDEO_X11_VISUALID");
|
||||||
/* FIXME FIXME FIXME
|
/* We really don't need DirectColor visuals until we implement
|
||||||
* Window creation fails in the colormap code on DirectColor visuals:
|
* gamma ramps, but we'll leave it on for now to catch bugs */
|
||||||
* XA_RGB_BEST_MAP not found and could not be created
|
int use_directcolor = 1;
|
||||||
* I'm disabling this for now until Bob can look at it. We don't need
|
|
||||||
* it until we implement the gamma fading using DirectColor RGB ramps
|
|
||||||
*/
|
|
||||||
int use_directcolor = 0;
|
|
||||||
int depth;
|
int depth;
|
||||||
|
|
||||||
/* Look for an exact visual, if requested */
|
/* Look for an exact visual, if requested */
|
||||||
|
|
|
@ -212,7 +212,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
||||||
xattr.background_pixel = 0;
|
xattr.background_pixel = 0;
|
||||||
xattr.border_pixel = 0;
|
xattr.border_pixel = 0;
|
||||||
|
|
||||||
if (visual->class == DirectColor || visual->class == PseudoColor) {
|
if (visual->class == PseudoColor) {
|
||||||
int nmaps;
|
int nmaps;
|
||||||
XStandardColormap cmap;
|
XStandardColormap cmap;
|
||||||
XStandardColormap *stdmaps;
|
XStandardColormap *stdmaps;
|
||||||
|
@ -299,6 +299,12 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
||||||
X11_TrackColormap(data->display, displaydata->screen, colormap,
|
X11_TrackColormap(data->display, displaydata->screen, colormap,
|
||||||
&cmap, visual);
|
&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 {
|
} else {
|
||||||
xattr.colormap =
|
xattr.colormap =
|
||||||
XCreateColormap(data->display,
|
XCreateColormap(data->display,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue