src/video/x11/SDL_x11window.c
changeset 6540 44459e2f6e4d
parent 6539 c76274e7f32a
child 6541 be103236441d
equal deleted inserted replaced
6539:c76274e7f32a 6540:44459e2f6e4d
    77     } else {
    77     } else {
    78         return SDL_FALSE;
    78         return SDL_FALSE;
    79     }
    79     }
    80 }
    80 }
    81 
    81 
       
    82 #if 0
    82 static SDL_bool
    83 static SDL_bool
    83 X11_IsActionAllowed(SDL_Window *window, Atom action)
    84 X11_IsActionAllowed(SDL_Window *window, Atom action)
    84 {
    85 {
    85     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
    86     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
    86     Atom _NET_WM_ALLOWED_ACTIONS = data->videodata->_NET_WM_ALLOWED_ACTIONS;
    87     Atom _NET_WM_ALLOWED_ACTIONS = data->videodata->_NET_WM_ALLOWED_ACTIONS;
   103         }
   104         }
   104         XFree(list);
   105         XFree(list);
   105     }
   106     }
   106     return ret;
   107     return ret;
   107 }
   108 }
       
   109 #endif /* 0 */
   108 
   110 
   109 void
   111 void
   110 X11_SetNetWMState(_THIS, Window xwindow, Uint32 flags)
   112 X11_SetNetWMState(_THIS, Window xwindow, Uint32 flags)
   111 {
   113 {
   112     SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
   114     SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
   910     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   912     SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   911     SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata;
   913     SDL_DisplayData *displaydata = (SDL_DisplayData *) _display->driverdata;
   912     Display *display = data->videodata->display;
   914     Display *display = data->videodata->display;
   913     Atom _NET_WM_STATE = data->videodata->_NET_WM_STATE;
   915     Atom _NET_WM_STATE = data->videodata->_NET_WM_STATE;
   914     Atom _NET_WM_STATE_FULLSCREEN = data->videodata->_NET_WM_STATE_FULLSCREEN;
   916     Atom _NET_WM_STATE_FULLSCREEN = data->videodata->_NET_WM_STATE_FULLSCREEN;
   915     Atom _NET_WM_ACTION_FULLSCREEN = data->videodata->_NET_WM_ACTION_FULLSCREEN;
       
   916 
   917 
   917     if (X11_IsWindowMapped(_this, window)) {
   918     if (X11_IsWindowMapped(_this, window)) {
   918         XEvent e;
   919         XEvent e;
   919 
   920 
   920         if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
   921         if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
   928                 /* we are going fullscreen so turn the flags off */
   929                 /* we are going fullscreen so turn the flags off */
   929                 sizehints->flags &= ~(PMinSize | PMaxSize);
   930                 sizehints->flags &= ~(PMinSize | PMaxSize);
   930             } else {
   931             } else {
   931                 /* Reset the min/max width height to make the window non-resizable again */
   932                 /* Reset the min/max width height to make the window non-resizable again */
   932                 sizehints->flags |= PMinSize | PMaxSize;
   933                 sizehints->flags |= PMinSize | PMaxSize;
   933                 sizehints->min_width = sizehints->max_width = window->w;
   934                 sizehints->min_width = sizehints->max_width = window->windowed.w;
   934                 sizehints->min_height = sizehints->max_height = window->h;
   935                 sizehints->min_height = sizehints->max_height = window->windowed.h;
   935             }
   936             }
   936             XSetWMNormalHints(display, data->xwindow, sizehints);
   937             XSetWMNormalHints(display, data->xwindow, sizehints);
   937             XFree(sizehints);
   938             XFree(sizehints);
   938         }
   939         }
   939 
   940