Fix the size to the windowed mode, not the fullscreen mode.
authorSam Lantinga <slouken@libsdl.org>
Wed, 03 Oct 2012 12:19:55 -0700
changeset 6540 44459e2f6e4d
parent 6539 c76274e7f32a
child 6541 be103236441d
Fix the size to the windowed mode, not the fullscreen mode.
src/video/x11/SDL_x11window.c
--- a/src/video/x11/SDL_x11window.c	Wed Oct 03 12:14:04 2012 -0700
+++ b/src/video/x11/SDL_x11window.c	Wed Oct 03 12:19:55 2012 -0700
@@ -79,6 +79,7 @@
     }
 }
 
+#if 0
 static SDL_bool
 X11_IsActionAllowed(SDL_Window *window, Atom action)
 {
@@ -105,6 +106,7 @@
     }
     return ret;
 }
+#endif /* 0 */
 
 void
 X11_SetNetWMState(_THIS, Window xwindow, Uint32 flags)
@@ -912,7 +914,6 @@
     Display *display = data->videodata->display;
     Atom _NET_WM_STATE = data->videodata->_NET_WM_STATE;
     Atom _NET_WM_STATE_FULLSCREEN = data->videodata->_NET_WM_STATE_FULLSCREEN;
-    Atom _NET_WM_ACTION_FULLSCREEN = data->videodata->_NET_WM_ACTION_FULLSCREEN;
 
     if (X11_IsWindowMapped(_this, window)) {
         XEvent e;
@@ -930,8 +931,8 @@
             } else {
                 /* Reset the min/max width height to make the window non-resizable again */
                 sizehints->flags |= PMinSize | PMaxSize;
-                sizehints->min_width = sizehints->max_width = window->w;
-                sizehints->min_height = sizehints->max_height = window->h;
+                sizehints->min_width = sizehints->max_width = window->windowed.w;
+                sizehints->min_height = sizehints->max_height = window->windowed.h;
             }
             XSetWMNormalHints(display, data->xwindow, sizehints);
             XFree(sizehints);