iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
23.06k stars 1.06k forks source link

Windows need to be created in the winit event loop after receiving `Resumed`. #2241

Closed dtzxporter closed 3 weeks ago

dtzxporter commented 3 months ago

Is there an existing issue for this?

Is this issue related to iced?

What happened?

This will be a hard error in the future of winit, but with the newer version you must create the window objects inside the event loop after receiving Resumed. Not doing so will cause issues with various macOS platform features, fullscreen, wgpu bugs, etc.

Other platforms will send Resumed to emulate the behavior.

What is the expected behavior?

Iced creates the windows properly.

Version

master

Operating System

macOS

Do you have any log output?

N/A
dtzxporter commented 3 months ago

Recently merged: https://github.com/rust-windowing/winit/pull/3447