Skip to content
Permalink
Browse files

fix video viewport not being updated after leaving fullscreen

  • Loading branch information...
Akaricchi committed Sep 11, 2019
1 parent 28ba4dc commit a84f7c8629c98f9b6e54ee2092465768bb8e4c82
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/video.c
@@ -306,8 +306,6 @@ void video_set_mode(uint display, uint w, uint h, bool fs, bool resizable) {
if(size_changed) {
if(fs && !config_get_int(CONFIG_FULLSCREEN_DESKTOP)) {
video_set_display_mode(display, w, h);
video_set_fullscreen_internal(fs);
video_update_mode_settings();
} else if(video.backend == VIDEO_BACKEND_X11) {
// XXX: I would like to use SDL_SetWindowSize for size changes, but apparently it's impossible to reliably detect
// when it fails to actually resize the window. For example, a tiling WM (awesome) may be getting in its way
@@ -322,12 +320,15 @@ void video_set_mode(uint display, uint w, uint h, bool fs, bool resizable) {
return;
} else {
SDL_SetWindowSize(video.window, w, h);
video_update_mode_settings();
}
}

video_set_fullscreen_internal(fs);
SDL_SetWindowResizable(video.window, resizable);

if(size_changed) {
video_update_mode_settings();
}
}

void video_set_fullscreen(bool fullscreen) {

0 comments on commit a84f7c8

Please sign in to comment.
You can’t perform that action at this time.