Auto merge of #13983 - emilio:event, r=notriddle

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

Otherwise we can end up infinitely spinning for no good reason.

This happened today to me. Obviously the underlying situation is also buggy, but this seemed like a more sane behavior compared to infinitely spin waiting for a never-arriving event.

r? @glennw

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13983)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-10-29 23:18:44 -05:00 committed by GitHub
commit 7e96f87565

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