rust-windowing / winit

Window handling library in pure Rust
https://docs.rs/winit/
Apache License 2.0
4.88k stars 911 forks source link

iOS: Never queue application-level events #3905

Open madsmtm opened 2 months ago

madsmtm commented 2 months ago

Events like resumed, new_events, about_to_wait, and so on will never happen as a result of programmer action, so we'll never need to queue those. This allows us to remove the need for the old Event struct in the iOS backend.

Furthermore, we can now remove InUserCallback, since that state is already stored inside EventHandler.

I've tried to otherwise keep the semantics as close to the original by calling handle_nonuser_events(mtm, []), which flushes pending events.

madsmtm commented 2 months ago

Incidentally, this fixes https://github.com/rust-windowing/winit/issues/3714, but makes https://github.com/rust-windowing/winit/issues/3816 much worse - not quite sure why yet? But will fix it separately from this, see https://github.com/rust-windowing/winit/pull/3906