Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix Colormap when using X11_SetWindowFullscreenViaWM() path.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Michael Sartain committed Oct 11, 2012
1 parent 9771299 commit 8919996
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions TODO
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8919996

Please sign in to comment.