aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-03-23 10:35:31 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-03-23 10:35:31 +0100
commita6485045f15dbd98c4c4863dddf71cae01f931bb (patch)
tree22f402de6a4f7eb9c4ff26b5c14c0ee98bd0985b /src
parentfce9b40deb8cfc07f2dee2d8a493632c3bac2943 (diff)
parent918833b19fee978119839d1ddfe01912fc13c4d3 (diff)
downloadglutin-a6485045f15dbd98c4c4863dddf71cae01f931bb.tar.gz
glutin-a6485045f15dbd98c4c4863dddf71cae01f931bb.zip
Merge pull request #318 from glennw/thread-wake-mac
Fix waking up mac event loop from thread.
Diffstat (limited to 'src')
-rw-r--r--src/cocoa/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cocoa/mod.rs b/src/cocoa/mod.rs
index ee3b03f..fc03198 100644
--- a/src/cocoa/mod.rs
+++ b/src/cocoa/mod.rs
@@ -30,7 +30,7 @@ use std::str::from_utf8;
use std::sync::Mutex;
use std::ascii::AsciiExt;
-use events::Event::{MouseInput, MouseMoved, ReceivedCharacter, KeyboardInput, MouseWheel};
+use events::Event::{Awakened, MouseInput, MouseMoved, ReceivedCharacter, KeyboardInput, MouseWheel};
use events::ElementState::{Pressed, Released};
use events::MouseButton;
use events;
@@ -333,6 +333,8 @@ impl<'a> Iterator for WaitEventsIterator<'a> {
// calling poll_events()
if let Some(ev) = self.window.poll_events().next() {
return Some(ev);
+ } else {
+ return Some(Awakened);
}
}
}