From 9e460ba53e5d4c56d7a45c7580580f3a22ff12d0 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 24 Dec 2020 12:29:00 -0400 Subject: [PATCH] Fix explicit window position not being restored in some cases when exiting fullscreen Fixes #1426 --- src/modules/window/sdl/Window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index 81fccc233..2b1d635b5 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -481,7 +481,7 @@ bool Window::setWindow(int width, int height, WindowSettings *settings) int x = f.x; int y = f.y; - if (f.useposition && !f.fullscreen) + if (f.useposition) { // The position needs to be in the global coordinate space. SDL_Rect displaybounds = {}; @@ -511,7 +511,7 @@ bool Window::setWindow(int width, int height, WindowSettings *settings) // Enforce minimum window dimensions. SDL_SetWindowMinimumSize(window, f.minwidth, f.minheight); - if ((f.useposition || f.centered) && !f.fullscreen) + if (f.useposition || f.centered) SDL_SetWindowPosition(window, x, y); SDL_RaiseWindow(window);