aboutsummaryrefslogtreecommitdiffstats
path: root/examples/fullscreen.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/fullscreen.rs')
-rw-r--r--examples/fullscreen.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs
index 246a162..707fd7d 100644
--- a/examples/fullscreen.rs
+++ b/examples/fullscreen.rs
@@ -46,10 +46,15 @@ fn main() {
let context = support::load(&window);
- while !window.is_closed() {
+ for event in window.wait_events() {
context.draw_frame((0.0, 1.0, 0.0, 1.0));
window.swap_buffers();
- println!("{:?}", window.wait_events().next());
+ println!("{:?}", event);
+
+ match event {
+ glutin::Event::Closed => break,
+ _ => ()
+ }
}
}