Skip to content

Commit

Permalink
glutin: Close the window if the event stream is closed.
Browse files Browse the repository at this point in the history
Otherwise we can end up infinitely spinning for no good reason.
  • Loading branch information
emilio committed Oct 30, 2016
1 parent 47d29fd commit f51f478
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ports/glutin/window.rs
Expand Up @@ -522,7 +522,7 @@ impl Window {
let event = match window.wait_events().next() {
None => {
warn!("Window event stream closed.");
return false;
return true;
},
Some(event) => event,
};
Expand Down Expand Up @@ -550,7 +550,7 @@ impl Window {
let event = match window.wait_events().next() {
None => {
warn!("Window event stream closed.");
return false;
return true;
},
Some(event) => event,
};
Expand Down

0 comments on commit f51f478

Please sign in to comment.