godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.79k stars 20.13k forks source link

Window sizing issue on i3wm when `resizable` is disabled #49206

Open NrdyBhu1 opened 3 years ago

NrdyBhu1 commented 3 years ago

Godot version: Godot_v3.3-stable_x11.64

OS/device including version: Ubuntu 20.04, Display GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] [10DE:1140] NVIDIA Corporation

Issue description: I was making a game with window resolution 500x600, and I had this issue when I changed the resizable property. I am using i3wm on Ubuntu 20.04.
Screenshot from 2021-05-30 21-27-41 When I set resizable to true, and when I convert the game window from maximized to floating window, it gets correct resolution. Whereas when I set it to false, It defaults to 1024x760 resolution.

https://user-images.githubusercontent.com/61649925/120103333-c0c9a000-c16c-11eb-93c0-c95957074243.mp4

When I tried the same without changing anything in normal Ubuntu, it worked.

https://user-images.githubusercontent.com/61649925/120103355-d63eca00-c16c-11eb-9fdc-65453491f8e4.mp4

This is the bug I faced only on a window manager.

Calinou commented 3 years ago

I think you need to enable resizable to get proper operation on tiling WMs. With Godot's support for multiple resolutions, I don't see a compelling reason to disable window resizing anyway.

NrdyBhu1 commented 3 years ago

Well, what you say is true, but I really don't want the window to be resized, as it will be incompatible with my static body collisions when I export to other platforms. But I will try to fix the collisions to be dynamic myself, but will look forward to any commits related to this issue :+1:

insomniacUNDERSCORElemon commented 3 years ago

@NrdyBhu1 Can't you ensure that resizing the window doesn't change the game area, even if it's just using a viewport or proper project stretch settings? I suspect you don't have it set to mode=viewport (if going for pixel-art) and aspect=keep. See also control nodes (such as AspectRatioContainer) as if you can control it that way, your GUI can use any aspect ratio.

Also, if your walls had a visual component to them (even if off-screen) an incompatibility like this wouldn't be such a bad thing. Because you could see the walls.

On a less related note, aside from doing it dynamically if you had different manually-made maps for each aspect ratio that'd be great too. Even if it was just tall (current), and a square map. Non-scaling games that take up 1/3rd of the screen (or less) are quite annoying.