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 654044459e2f6e4d
parent 6539 c76274e7f32a
child 6541 be103236441d
Fix the size to the windowed mode, not the fullscreen mode.
src/video/x11/SDL_x11window.c
     1.1 --- a/src/video/x11/SDL_x11window.c	Wed Oct 03 12:14:04 2012 -0700
     1.2 +++ b/src/video/x11/SDL_x11window.c	Wed Oct 03 12:19:55 2012 -0700
     1.3 @@ -79,6 +79,7 @@
     1.4      }
     1.5  }
     1.6  
     1.7 +#if 0
     1.8  static SDL_bool
     1.9  X11_IsActionAllowed(SDL_Window *window, Atom action)
    1.10  {
    1.11 @@ -105,6 +106,7 @@
    1.12      }
    1.13      return ret;
    1.14  }
    1.15 +#endif /* 0 */
    1.16  
    1.17  void
    1.18  X11_SetNetWMState(_THIS, Window xwindow, Uint32 flags)
    1.19 @@ -912,7 +914,6 @@
    1.20      Display *display = data->videodata->display;
    1.21      Atom _NET_WM_STATE = data->videodata->_NET_WM_STATE;
    1.22      Atom _NET_WM_STATE_FULLSCREEN = data->videodata->_NET_WM_STATE_FULLSCREEN;
    1.23 -    Atom _NET_WM_ACTION_FULLSCREEN = data->videodata->_NET_WM_ACTION_FULLSCREEN;
    1.24  
    1.25      if (X11_IsWindowMapped(_this, window)) {
    1.26          XEvent e;
    1.27 @@ -930,8 +931,8 @@
    1.28              } else {
    1.29                  /* Reset the min/max width height to make the window non-resizable again */
    1.30                  sizehints->flags |= PMinSize | PMaxSize;
    1.31 -                sizehints->min_width = sizehints->max_width = window->w;
    1.32 -                sizehints->min_height = sizehints->max_height = window->h;
    1.33 +                sizehints->min_width = sizehints->max_width = window->windowed.w;
    1.34 +                sizehints->min_height = sizehints->max_height = window->windowed.h;
    1.35              }
    1.36              XSetWMNormalHints(display, data->xwindow, sizehints);
    1.37              XFree(sizehints);