Open gokiburikin opened 2 months ago
Can you check if https://github.com/godotengine/godot/pull/88734 fixes this issue?
It does make the border black when transparent is disabled, but does not fix the issue. The border is still transparent if transparent is enabled in the project settings regardless of when I set it to false during runtime. Tried waiting frames, minimizing, maximizing, switching between modes, etc. It just never seems to draw the border again while in Fullscreen mode.
A bit of an update here. I'm messing around with code I don't understand to try to figure out what might be happening and what I said isn't entirely accurate; a border is being drawn, but it's being drawn in a weird mode perhaps? If I change the black border to not-black it can clearly be seen, but it doesn't draw over stuff? Hard to explain so here are some examples.
The screenshot above shows a transparent window for context, but this is what I see when transparency starts enabled, the default clear color is black, and I disable transparency before making the window Fullscreen:
After more testing it appears as though changing HRGN hRgn = CreateRectRgn(0, 0, -1, -1);
to HRGN hRgn = CreateRectRgn(0, 0, 0, 0);
fixes the issue I'm experiencing. This only seems to work for setting Window.transparent = false
though; Window.transparent_bg = false
still leaves one of these weird borders.
Tested versions
v4.3.dev6.official [89850d553] v4.3.beta2.official [b75f0485b]
System information
Godot v4.3.dev6 - Windows 10.0.19044 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.5161) - Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 Threads)
Issue description
I have transparency and borderless enabled on my main window for a splash screen which I then disable when the game loads, but Fullscreen mode which normally draws a 1 pixel border of clear color draws a transparent border instead despite disabling transparency.
I would expect the 1 pixel border to be the solid default clear color.
Steps to reproduce
1) Enable Transparency, Per Pixel Transparency, Borderless, and a transparent PNG splash screen in the project settings. 2) Run a script that disables Window.transparency and switches Window.mode to Fullscreen when the game loads.
The 1 pixel border is transparent instead of the clear color.
Oddly, if Transparency is disabled in the project settings and enabled when the game loads the border is also transparent even though I'd expect it to be black if it weren't being updated.
Minimal reproduction project (MRP)
transparent-splash-fullscreen-mrp.zip