godotengine / godot

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

Borderless non-fullscreen windows with Wayland display server still have decorations #93472

Open KitzuGG opened 1 month ago

KitzuGG commented 1 month ago

Tested versions

System information

Godot v4.3.beta2.mono - Fedora Linux 40 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (nvidia; 555.52.04) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)

Issue description

Probably really niche, but found this problem On KDE Plasma 6, if I specify to use the Wayland display server, (non fullscreen) borderless windows are not borderless I'm neither expert on Wayland nor know how is it being implemented in the engine, but maybe is it because on Wayland Display server it uses Server Side Decorations? I saw issues for Gnome users that had the opposite problem ( #89793 ) (probably because Gnome doesn't do SSD) so I thought it's that ? Screenshot_20240622_172142 Screenshot_20240622_172236

Steps to reproduce

Minimal reproduction project (MRP)

Any new project

Riteo commented 3 weeks ago

Thanks for the report! Unfortunately, this is something I'm aware of and, confusingly, this is a bug in the client-side decoration library we use, libdecor: https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/63

To put it simply, this library handles the drawing for us by wrapping the window object inside its own thing, so that it can handle resizes and whatnot. When SSDs are available, it "soft-disables", making the wrapper "transparent".

It unfortunately looks like the fallback code doesn't handle borderless windows very well.

I'm not sure that much can't be done outside of fixing the code upstream or making our own CSDs, which isn't trivial yet.