mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fix explicit window position not being restored in some cases when exiting fullscreen
Fixes #1426
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user