Use the legacy fullscreen code if the window manager doesn't support the NetWM protocol.
authorSam Lantinga <slouken@libsdl.org>
Thu, 27 Sep 2012 11:39:31 -0700
changeset 6473 a5adb68266d0
parent 6472 d4623b7209db
child 6474 39087ac884d7
Use the legacy fullscreen code if the window manager doesn't support the NetWM protocol.
src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Thu Sep 27 11:29:13 2012 -0700
+++ b/src/video/x11/SDL_x11window.c	Thu Sep 27 11:39:31 2012 -0700
@@ -1134,9 +1134,12 @@
     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 */