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

fix(windows): don't show dummy window on start #32

Merged
merged 1 commit into from
Aug 14, 2024
Merged

fix(windows): don't show dummy window on start #32

merged 1 commit into from
Aug 14, 2024

Conversation

lesleyrs
Copy link
Contributor

This is needed to stop the destroyed window flashing on startup.

@ColleagueRiley
Copy link
Owner

Would passing 0 for the style flags to CreateWindowA when creating the dummy window also fix the issue?

@ColleagueRiley
Copy link
Owner

@lesleyrs This commit might fix the issue instead ba9a65f

@lesleyrs
Copy link
Contributor Author

@lesleyrs This commit might fix the issue instead ba9a65f

That's slightly better than the original (doesn't briefly show other window, but shows a white flash still maybe due to window style differences). I tried recording your change but you can't see the white flash on the recording, here are the other 2 though:

original:
window2

my change:
window

Not exactly sure why my change works because the other window doesn't get set to visible here but it works.

Also note there's a 1 pixel border around the window that gets fixed after resizing it, but that's a different issue.

@ColleagueRiley
Copy link
Owner

This is strange considering the window is never actually displayed. It's probably some weird winapi behavior.

@ColleagueRiley ColleagueRiley merged commit b3b1be4 into ColleagueRiley:main Aug 14, 2024
4 of 5 checks passed
@lesleyrs
Copy link
Contributor Author

You can keep window_style in dummy as 0 and it will still work same as just my change. That way if this one ever needs to be undone it'll still work better than before at least.

And yeah windowing can break easily I know both godotengine and winit have different issues on windows too, sdl and glfw work fine however.

@ColleagueRiley
Copy link
Owner

@lesleyrs I'm unsure if setting it as 0 will create other issues, so I'll leave it how it is.

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

Successfully merging this pull request may close these issues.

2 participants