Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | AltoWaltz |
Hello, I have an issue where taskbar gets active on the windows export when users click on the windows taskbar area while in fullscreen.
func Resolution():
ProjectSettings.set_setting("display/window/size/width", res_width)
ProjectSettings.set_setting("display/window/size/height", res_height)
OS.set_window_size(Vector2(res_width, res_height))
if (fullscreen == true):
OS.set_window_fullscreen(false)
OS.set_window_fullscreen(true)
elif (fullscreen == false):
OS.set_window_fullscreen(true)
OS.set_window_fullscreen(false)
OS.set_window_position(Vector2(0,0))
Settings:
Display/Resizable = On
Display/Borderless = Off
Display/Fullscreren = Off
This works pretty much how I want it to want on the Linux export. However, when I export to Windows the area of the windows taskbar gets active when clicking on it, effectively throwing the user out of the game.
I have tried with the code below but it looks like it doesn’t change anything:
var screenSize = Vector2(0,0)
screenSize.x = get_viewport().get_visible_rect().size.x # Get Width
screenSize.y = get_viewport().get_visible_rect().size.y # Get Height
ProjectSettings.set_setting("display/window/size/width", screenSize.x)
ProjectSettings.set_setting("display/window/size/height", screenSize.y)
OS.set_window_size(Vector2(screenSize.x, screenSize.y))
And help appreciated. Thank you.