Fix Colormap when using X11_SetWindowFullscreenViaWM() path.
authorMichael Sartain <mikesart@valvesoftware.com>
Thu, 11 Oct 2012 09:34:13 -0700
changeset 65681a6b0ae81937
parent 6567 d50613615139
child 6569 1f4e69a8e5e6
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
src/video/x11/SDL_x11window.c
     1.1 --- a/TODO	Wed Oct 10 23:10:04 2012 -0400
     1.2 +++ b/TODO	Thu Oct 11 09:34:13 2012 -0700
     1.3 @@ -6,6 +6,7 @@
     1.4   * Write automated test case for multi-draw APIs
     1.5   * Implement assertion code on iPhone
     1.6   * Add __WINDOWS__ in addition to __WIN32__
     1.7 + * Write test for fullscreen gamma to check X11 colormap handling
     1.8  
     1.9   * Check 1.2 revisions:
    1.10  	3554 - Need to resolve semantics for locking keys on different platforms
     2.1 --- a/src/video/x11/SDL_x11window.c	Wed Oct 10 23:10:04 2012 -0400
     2.2 +++ b/src/video/x11/SDL_x11window.c	Thu Oct 11 09:34:13 2012 -0700
     2.3 @@ -992,6 +992,13 @@
     2.4          }
     2.5          X11_SetNetWMState(_this, data->xwindow, flags);
     2.6      }
     2.7 +
     2.8 +	if( fullscreen ) {
     2.9 +		XInstallColormap(display, data->colormap);
    2.10 +	} else {
    2.11 +		XUninstallColormap(display, data->colormap);
    2.12 +	}
    2.13 +
    2.14      XFlush(display);
    2.15  }
    2.16