Fix Colormap when using X11_SetWindowFullscreenViaWM() path.
This was needed to get X11_SetWindowGammaRamp() working. Sam points out that there is an issue right now where
colormaps will only work with fullscreen windows, and we may want to set this when getting input focus for
windowed apps.
--- a/TODO Wed Oct 10 23:10:04 2012 -0400
+++ b/TODO Thu Oct 11 09:34:13 2012 -0700
@@ -6,6 +6,7 @@
* Write automated test case for multi-draw APIs
* Implement assertion code on iPhone
* Add __WINDOWS__ in addition to __WIN32__
+ * Write test for fullscreen gamma to check X11 colormap handling
* Check 1.2 revisions:
3554 - Need to resolve semantics for locking keys on different platforms
--- a/src/video/x11/SDL_x11window.c Wed Oct 10 23:10:04 2012 -0400
+++ b/src/video/x11/SDL_x11window.c Thu Oct 11 09:34:13 2012 -0700
@@ -992,6 +992,13 @@
}
X11_SetNetWMState(_this, data->xwindow, flags);
}
+
+ if( fullscreen ) {
+ XInstallColormap(display, data->colormap);
+ } else {
+ XUninstallColormap(display, data->colormap);
+ }
+
XFlush(display);
}