Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix the size to the windowed mode, not the fullscreen mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 3, 2012
1 parent 97550b0 commit 35f25e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -79,6 +79,7 @@ X11_IsWindowMapped(_THIS, SDL_Window * window)
}
}

#if 0
static SDL_bool
X11_IsActionAllowed(SDL_Window *window, Atom action)
{
Expand All @@ -105,6 +106,7 @@ X11_IsActionAllowed(SDL_Window *window, Atom action)
}
return ret;
}
#endif /* 0 */

void
X11_SetNetWMState(_THIS, Window xwindow, Uint32 flags)
Expand Down Expand Up @@ -912,7 +914,6 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis
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;
Expand All @@ -930,8 +931,8 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis
} 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);
Expand Down

0 comments on commit 35f25e6

Please sign in to comment.