mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Merge pull request #269 from tomaka/tomaka-patch-2
Fix poll_events() blocking on win32
This commit is contained in:
commit
de56a569e8
|
@ -270,7 +270,7 @@ impl<'a> Iterator for PollEventsIterator<'a> {
|
|||
fn next(&mut self) -> Option<Event> {
|
||||
use events::Event::Closed;
|
||||
|
||||
match self.window.events_receiver.recv() {
|
||||
match self.window.events_receiver.try_recv() {
|
||||
Ok(Closed) => {
|
||||
use std::sync::atomic::Ordering::Relaxed;
|
||||
self.window.is_closed.store(true, Relaxed);
|
||||
|
|
Loading…
Reference in a new issue