From 8919996060b6ba0789ce5e6e086c76c2ed051fa1 Mon Sep 17 00:00:00 2001 From: Michael Sartain Date: Thu, 11 Oct 2012 09:34:13 -0700 Subject: [PATCH] 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. --- TODO | 1 + src/video/x11/SDL_x11window.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/TODO b/TODO index 2eeb02be2..cee86c242 100644 --- a/TODO +++ b/TODO @@ -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 diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index 475a510d7..cc6b9f5de 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -992,6 +992,13 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis } X11_SetNetWMState(_this, data->xwindow, flags); } + + if( fullscreen ) { + XInstallColormap(display, data->colormap); + } else { + XUninstallColormap(display, data->colormap); + } + XFlush(display); }