src/video/x11/SDL_x11window.c
changeset 7566 b14d00c30095
parent 7523 9e9ab1dc3811
child 7617 918703f5cff8
     1.1 --- a/src/video/x11/SDL_x11window.c	Fri Aug 02 18:25:20 2013 -0400
     1.2 +++ b/src/video/x11/SDL_x11window.c	Sat Aug 03 02:20:00 2013 -0400
     1.3 @@ -878,6 +878,12 @@
     1.4      Atom _NET_WM_STATE_MAXIMIZED_VERT = data->videodata->_NET_WM_STATE_MAXIMIZED_VERT;
     1.5      Atom _NET_WM_STATE_MAXIMIZED_HORZ = data->videodata->_NET_WM_STATE_MAXIMIZED_HORZ;
     1.6  
     1.7 +    if (maximized) {
     1.8 +        window->flags |= SDL_WINDOW_MAXIMIZED;
     1.9 +    } else {
    1.10 +        window->flags &= ~SDL_WINDOW_MAXIMIZED;
    1.11 +    }
    1.12 +
    1.13      if (X11_IsWindowMapped(_this, window)) {
    1.14          XEvent e;
    1.15  
    1.16 @@ -895,15 +901,7 @@
    1.17          XSendEvent(display, RootWindow(display, displaydata->screen), 0,
    1.18                     SubstructureNotifyMask | SubstructureRedirectMask, &e);
    1.19      } else {
    1.20 -        Uint32 flags;
    1.21 -
    1.22 -        flags = window->flags;
    1.23 -        if (maximized) {
    1.24 -            flags |= SDL_WINDOW_MAXIMIZED;
    1.25 -        } else {
    1.26 -            flags &= ~SDL_WINDOW_MAXIMIZED;
    1.27 -        }
    1.28 -        X11_SetNetWMState(_this, data->xwindow, flags);
    1.29 +        X11_SetNetWMState(_this, data->xwindow, window->flags);
    1.30      }
    1.31      XFlush(display);
    1.32  }