Browse Source

Fix explicit window position not being restored in some cases when exiting fullscreen

Fixes #1426
Alex Szpakowski 4 years ago
parent
commit
9e460ba53e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/modules/window/sdl/Window.cpp

+ 2 - 2
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);