Merged Ryan's changes
authorSam Lantinga <slouken@libsdl.org>
Thu, 11 Oct 2012 14:44:27 -0700
changeset 6576 028529a31bc4
parent 6575 833a983f218e (diff)
parent 6573 b4e467b7761a (current diff)
child 6577 d38491853506
Merged Ryan's changes
--- a/src/video/x11/SDL_x11window.c	Thu Oct 11 17:20:43 2012 -0400
+++ b/src/video/x11/SDL_x11window.c	Thu Oct 11 14:44:27 2012 -0700
@@ -993,11 +993,13 @@
         X11_SetNetWMState(_this, data->xwindow, flags);
     }
 
-	if( fullscreen ) {
-		XInstallColormap(display, data->colormap);
-	} else {
-		XUninstallColormap(display, data->colormap);
-	}
+    if (data->visual->class == DirectColor) {
+        if ( fullscreen ) {
+            XInstallColormap(display, data->colormap);
+        } else {
+            XUninstallColormap(display, data->colormap);
+        }
+    }
 
     XFlush(display);
 }