Godot Version
4.2.1
Question
I have made a “minimize” button on my application, when clicked it minimizes the window to the taskbar. When I bring the application window back up, no matter where I click, it just minimizes it again. The correct usage would be the minimize buttont minimizes the window and when the window/application is brought back up again, it acts normal… A lot of forums show to use OS instead of DisplayServer but from what I can see OS doesn’t offer window settings anymore. Hopefully someone can help me with this, thanks.
func _on_gui_input(event):
if event is InputEventMouseButton:
if event.button_index == MOUSE_BUTTON_LEFT:
if types == TYPES.close:
get_tree().quit()
elif types == TYPES.maximize:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_MAXIMIZED)
elif types == TYPES.minimize:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_MINIMIZED)