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

Commit

Permalink
Use the legacy fullscreen code if the window manager doesn't support …
Browse files Browse the repository at this point in the history
…the NetWM protocol.
  • Loading branch information
slouken committed Sep 27, 2012
1 parent 2be2133 commit 2d4b54e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -1134,9 +1134,12 @@ X11_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * _display,
if (env) {
legacy = SDL_atoi(env);
} else {
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata;
if ( displaydata->use_vidmode ) {
legacy = SDL_TRUE; /* the new stuff only works with XRandR. */
} else if ( !videodata->net_wm ) {
legacy = SDL_TRUE; /* The window manager doesn't support it */
} else {
/* !!! FIXME: look at the window manager name, and blacklist certain ones? */
/* http://stackoverflow.com/questions/758648/find-the-name-of-the-x-window-manager */
Expand Down

0 comments on commit 2d4b54e

Please sign in to comment.