bugfix: preserve window position

This commit is contained in:
Kartik K. Agaram 2023-07-10 15:50:47 -07:00
parent 9df1c3f997
commit e68261d7a3
1 changed files with 7 additions and 2 deletions

View File

@ -164,8 +164,13 @@ function source.resize_window_from_settings(settings)
end
function source.set_window_position_from_settings(settings)
-- love.window.setPosition doesn't quite seem to do what is asked of it on Linux.
App.screen.move(settings.x, settings.y-37, settings.displayindex)
local os = love.system.getOS()
if os == 'Linux' then
-- love.window.setPosition doesn't quite seem to do what is asked of it on Linux.
App.screen.move(settings.x, settings.y-37, settings.displayindex)
else
App.screen.move(settings.x, settings.y, settings.displayindex)
end
end
function source.initialize_default_settings()