src/video/x11/SDL_x11window.c
changeset 7566 b14d00c30095
parent 7523 9e9ab1dc3811
child 7617 918703f5cff8
equal deleted inserted replaced
7565:3d97fc52d294 7566:b14d00c30095
   876     Display *display = data->videodata->display;
   876     Display *display = data->videodata->display;
   877     Atom _NET_WM_STATE = data->videodata->_NET_WM_STATE;
   877     Atom _NET_WM_STATE = data->videodata->_NET_WM_STATE;
   878     Atom _NET_WM_STATE_MAXIMIZED_VERT = data->videodata->_NET_WM_STATE_MAXIMIZED_VERT;
   878     Atom _NET_WM_STATE_MAXIMIZED_VERT = data->videodata->_NET_WM_STATE_MAXIMIZED_VERT;
   879     Atom _NET_WM_STATE_MAXIMIZED_HORZ = data->videodata->_NET_WM_STATE_MAXIMIZED_HORZ;
   879     Atom _NET_WM_STATE_MAXIMIZED_HORZ = data->videodata->_NET_WM_STATE_MAXIMIZED_HORZ;
   880 
   880 
       
   881     if (maximized) {
       
   882         window->flags |= SDL_WINDOW_MAXIMIZED;
       
   883     } else {
       
   884         window->flags &= ~SDL_WINDOW_MAXIMIZED;
       
   885     }
       
   886 
   881     if (X11_IsWindowMapped(_this, window)) {
   887     if (X11_IsWindowMapped(_this, window)) {
   882         XEvent e;
   888         XEvent e;
   883 
   889 
   884         SDL_zero(e);
   890         SDL_zero(e);
   885         e.xany.type = ClientMessage;
   891         e.xany.type = ClientMessage;
   893         e.xclient.data.l[3] = 0l;
   899         e.xclient.data.l[3] = 0l;
   894 
   900 
   895         XSendEvent(display, RootWindow(display, displaydata->screen), 0,
   901         XSendEvent(display, RootWindow(display, displaydata->screen), 0,
   896                    SubstructureNotifyMask | SubstructureRedirectMask, &e);
   902                    SubstructureNotifyMask | SubstructureRedirectMask, &e);
   897     } else {
   903     } else {
   898         Uint32 flags;
   904         X11_SetNetWMState(_this, data->xwindow, window->flags);
   899 
       
   900         flags = window->flags;
       
   901         if (maximized) {
       
   902             flags |= SDL_WINDOW_MAXIMIZED;
       
   903         } else {
       
   904             flags &= ~SDL_WINDOW_MAXIMIZED;
       
   905         }
       
   906         X11_SetNetWMState(_this, data->xwindow, flags);
       
   907     }
   905     }
   908     XFlush(display);
   906     XFlush(display);
   909 }
   907 }
   910 
   908 
   911 void
   909 void