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

Replace window::Mode with window commands #1389

Merged
merged 2 commits into from
Aug 18, 2022
Merged

Conversation

hecrj
Copy link
Member

@hecrj hecrj commented Jul 18, 2022

The declarative Application::mode approach does not work well because an OS can change the window mode without asking iced for permission, eventually leading to desynchronization.

Therefore, the current design should be replaced with a Command-based approach where the mode of a window is assumed to be external and can be queried at will.

Additionally, this better design allows us to make the window visible only when a frame has been rendered to avoid the "blank window flash" on Windows.

TODO

  • Implement window commands to control and query window mode.

Closes #261.

@hecrj hecrj added bug Something isn't working improvement An internal improvement shell labels Jul 18, 2022
@hecrj hecrj added this to the 0.5.0 milestone Jul 18, 2022
Additionally, only show the window once one frame has been rendered to avoid blank flashes on Windows.
@hecrj hecrj merged commit da7e859 into master Aug 18, 2022
@hecrj hecrj deleted the refactor-window-mode branch August 18, 2022 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working improvement An internal improvement shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Window flashes white before showing expected content
1 participant