Skip to content

Commit

Permalink
iOS: Never queue application-level events
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
madsmtm committed Sep 10, 2024
1 parent b674d20 commit b81218b
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 310 deletions.
1 change: 0 additions & 1 deletion src/platform_impl/apple/event_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ impl EventHandler {
self.inner.try_borrow().is_err()
}

#[cfg(target_os = "macos")]
pub(crate) fn ready(&self) -> bool {
matches!(self.inner.try_borrow().as_deref(), Ok(Some(_)))
}
Expand Down
Loading

0 comments on commit b81218b

Please sign in to comment.