Hello! I am trying to manage different resolutions in my game. The viewport initial width and height is set to 640x360, and I am using the integer scale mode so that it scales perfectly to 1280x720 and 1920x1080. It works great when the game is on fullscreen. But when I go to windowed and set the window size to 1920x1080, the console show it is actually being resized to 1920x1071, which is heavily noticeable because then the content is not scaled and it shows black bars all around the game.
The code I am using is this one:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
get_tree().root.size = resolution
get_tree().root.position = centered_position
print(resolution)
print(DisplayServer.window_get_size())
And it is printing the following:
(1920, 1080)
(1920, 1071)
I am guessing it is taking into account my computer's taskbar, but I don't know why it would be doing that, or if that behaviour is expected.