src/video/x11/SDL_x11window.c
changeset 6575 833a983f218e
parent 6568 1a6b0ae81937
child 6638 3d221da309d3
     1.1 --- a/src/video/x11/SDL_x11window.c	Thu Oct 11 14:42:49 2012 -0700
     1.2 +++ b/src/video/x11/SDL_x11window.c	Thu Oct 11 14:43:13 2012 -0700
     1.3 @@ -993,11 +993,13 @@
     1.4          X11_SetNetWMState(_this, data->xwindow, flags);
     1.5      }
     1.6  
     1.7 -	if( fullscreen ) {
     1.8 -		XInstallColormap(display, data->colormap);
     1.9 -	} else {
    1.10 -		XUninstallColormap(display, data->colormap);
    1.11 -	}
    1.12 +    if (data->visual->class == DirectColor) {
    1.13 +        if ( fullscreen ) {
    1.14 +            XInstallColormap(display, data->colormap);
    1.15 +        } else {
    1.16 +            XUninstallColormap(display, data->colormap);
    1.17 +        }
    1.18 +    }
    1.19  
    1.20      XFlush(display);
    1.21  }