aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorRengierof <anttoni.v.koivu@gmail.com>2015-12-26 16:47:25 +0200
committerRengierof <anttoni.v.koivu@gmail.com>2015-12-26 16:47:25 +0200
commitd2ac6cfa11899378546c1fb4b71943c83bb3dc62 (patch)
tree1bd9c0fdb40a044947eb9ece033d37c0f315812e /examples
parent11e27889aec6dfb943c6fb1aa97900e21e319bb7 (diff)
downloadglutin-d2ac6cfa11899378546c1fb4b71943c83bb3dc62.tar.gz
glutin-d2ac6cfa11899378546c1fb4b71943c83bb3dc62.zip
Fixed grabbing example.
Diffstat (limited to 'examples')
-rw-r--r--examples/grabbing.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/grabbing.rs b/examples/grabbing.rs
index 4b12b02..485be78 100644
--- a/examples/grabbing.rs
+++ b/examples/grabbing.rs
@@ -18,8 +18,8 @@ fn main() {
let context = support::load(&window);
let mut grabbed = false;
-
- for event in window.poll_events() {
+
+ for event in window.wait_events() {
match event {
Event::KeyboardInput(ElementState::Pressed, _, _) => {
if grabbed {
@@ -33,6 +33,8 @@ fn main() {
}
},
+ Event::Closed => break,
+
a @ Event::MouseMoved(_) => {
println!("{:?}", a);
},
@@ -44,4 +46,3 @@ fn main() {
let _ = window.swap_buffers();
}
}
-