Skip to content

Commit

Permalink
Revert "Workaround winit bug where events execute immediately (#4)"
Browse files Browse the repository at this point in the history
This reverts commit 1813f60.
This is fixed upstream.
  • Loading branch information
ddfisher committed Jun 13, 2024
1 parent 4de1db9 commit 5fe5a23
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/platform_impl/web/event_loop/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ impl<T: 'static> EventLoopProxy<T> {

pub fn send_event(&self, event: T) -> Result<(), EventLoopClosed<T>> {
self.sender.send(event).map_err(|SendError(event)| EventLoopClosed(event))?;

// Workaround: the we should never be immediately executing new things on the event loop!
let runner = self.runner.clone();
wasm_bindgen_futures::spawn_local(async move {
runner.wake();
});

self.runner.wake();
Ok(())
}
}
Expand Down

0 comments on commit 5fe5a23

Please sign in to comment.