diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-12-27 14:34:13 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-12-27 14:34:13 +0100 |
commit | 92ae05d6ce7d44be31cafe67a4ff3bb39e6cb11a (patch) | |
tree | 3e8a779660455dd991f542ee67dc00903f7afeb5 /examples/grabbing.rs | |
parent | f76aba3d3778978bef0087f830ebf69954110233 (diff) | |
parent | bc811fa587ac3f9c996d71cfc285b8edad0bf9f7 (diff) | |
download | glutin-92ae05d6ce7d44be31cafe67a4ff3bb39e6cb11a.tar.gz glutin-92ae05d6ce7d44be31cafe67a4ff3bb39e6cb11a.zip |
Merge pull request #682 from regnierof/master
Fixed setting cursor and cursor state
Diffstat (limited to 'examples/grabbing.rs')
-rw-r--r-- | examples/grabbing.rs | 7 |
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(); } } - |