glutin: Close the window if the event stream is closed.

Otherwise we can end up infinitely spinning for no good reason.
This commit is contained in:
Emilio Cobos Álvarez 2016-10-30 02:12:34 +02:00
parent 47d29fd056
commit f51f47813b
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -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,
};
@ -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,
};