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