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 the root window between windowed, fullscreen and minimized modes can cause its Windows preview to appear badly. #79107

Open
ghost opened this issue Jul 6, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 6, 2023

Godot version

v4.1.stable.official.970459615

System information

Windows 10.0.19045 - Vulkan (Compatibility) - GeForce GT 540M () - Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz (8 Threads)

Issue description

Switching the root window's mode property between MODE_WINDOWED and MODE_(EXCLUSIVE)_FULLSCREEN, and then setting it to MODE_MINIMIZED can make the Windows taskbar preview of the window appear odd.

The window on the preview has two menu bars and is displayed with wrong scale/position of it's contents.
Additionally weird transparent window silhouettes appear with wrong size and positioning (including being on a wrong monitor in a double monitor setup)

The game's window is back to normal after manually changing it to windowed mode (clicking it on the taskbar).

image

Feel free to check out the reproduction video:

screen_recording.mp4

Steps to reproduce

  1. Use the minimal reproduction project, or:
  2. Create a new project (I used Compatibility renderer) with a visible node.
  3. Attach the script and run the project:
extends TextureRect


@onready var tree = get_tree()
@onready var Root = tree.root


func _ready():

#	start with MODE_WINOWED -> MODE_FULSCREEN -> MODE_MINIMIZED check preview

#	without awaits the preview looks differently but still not the same as the window

	await tree.create_timer(1).timeout
	Root.mode = Root.MODE_FULLSCREEN # MODE_EXCLUSIVE_FULLSCREEN also works
	await tree.create_timer(1).timeout
	Root.mode = Root.MODE_MINIMIZED
	await tree.create_timer(1).timeout
  1. Hover over the minimized icon of the game on the Windows task bar.

Minimal reproduction project

WindowsPreviewDisappearingTest4.1.zip

@ghost ghost changed the title Changing the root window between windowed, fullscreen and minimized modes can cause it's Windows preview to appear badly. Changing the root window between windowed, fullscreen and minimized modes can cause its Windows preview to appear badly. Jul 6, 2023
@ghost
Copy link
Author

ghost commented Jul 23, 2023

Sometimes the preview changes to this weird white background with the project's icon in the centre instead.

image

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

No branches or pull requests

1 participant