Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing window mode Windowed -> Maximized -> Minimized -> Windowed results in window filling the screen #93488

Closed
alvinhochun opened this issue Jun 22, 2024 · 0 comments · Fixed by #93733

Comments

@alvinhochun
Copy link
Contributor

Tested versions

System information

Godot v4.3.beta2 - Windows 10.0.19045

Issue description

If the window mode is changed from Windowed -> Maximized -> Minimized -> Windowed, the window does not restore to the original windowed size, but instead fills the whole screen (but the window is not in maximized state).

If I replace

ShowWindow(wd.hWnd, SW_RESTORE);
with ShowWindow(wd.hWnd, SW_SHOWNORMAL) it seems to work as expected, but I'm not sure why these flags behave like they do...

Steps to reproduce

	await get_tree().create_timer(1.0).timeout
	get_window().mode = Window.MODE_MAXIMIZED
	await get_tree().create_timer(1.0).timeout
	get_window().mode = Window.MODE_MINIMIZED
	await get_tree().create_timer(1.0).timeout
	#get_window().mode = Window.MODE_MAXIMIZED
	get_window().mode = Window.MODE_WINDOWED

Minimal reproduction project (MRP)

minimized-restore-bug.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants