aboutsummaryrefslogtreecommitdiffstats
path: root/examples/fullscreen.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-06-17 07:36:16 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-06-17 07:36:16 +0200
commit7773996d7b103e4e057cd547c0666e5d5834416f (patch)
tree292b9dc3717c10b9435b14b04b0a590b8b524ac3 /examples/fullscreen.rs
parent90b28c205219df732d83e403f98abab31e6e52d4 (diff)
parent39128dd7e11ffa05eb06933cb6e3ce0e750e8806 (diff)
downloadglutin-7773996d7b103e4e057cd547c0666e5d5834416f.tar.gz
glutin-7773996d7b103e4e057cd547c0666e5d5834416f.zip
Merge pull request #488 from tomaka/rem-is-closed
Remove the is_closed function
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,
+ _ => ()
+ }
}
}