apgoetz / jolly

Apache License 2.0
12 stars 3 forks source link

Modified Jolly to start with hidden window. #9

Closed apgoetz closed 1 year ago

apgoetz commented 1 year ago

On Windows computers, especially where animations have been disabled, starting Jolly can cause a default-sized window to appear that quickly changes shape to the regular Jolly window.

You can also sometimes see a blank Jolly window appear first that then renders in the starting text.

This is due to the underlying behavior of the winit crate that Jolly uses via iced. According to winit issue 1536, certain winit platforms will display garbage data until the first rendering, so best practice is to spawn a hidden window, and only make it visible once the initial layout is ready.

This allows winit to send the startup resize commands while the window is hidden and only show the Jolly window once we are ready to show the first frame.