aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/wayland/context.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-08-21 19:27:58 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-08-21 19:27:58 +0200
commit506c4ed6ea669c885c8a33668e0f8a00fd351989 (patch)
tree395f75e9ca47d9ac5734b381988e58971932d425 /src/api/wayland/context.rs
parent73e4a7d4b17bfc08acc198e0336a2f5c7fd2036a (diff)
parentf3e67128dbc6a0a6cbb40c7e5a0bcedebeb478cd (diff)
downloadglutin-506c4ed6ea669c885c8a33668e0f8a00fd351989.tar.gz
glutin-506c4ed6ea669c885c8a33668e0f8a00fd351989.zip
Merge pull request #578 from vberger/master
Minor fixes to wayland backend
Diffstat (limited to 'src/api/wayland/context.rs')
-rw-r--r--src/api/wayland/context.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/api/wayland/context.rs b/src/api/wayland/context.rs
index 6d7df86..ad0977c 100644
--- a/src/api/wayland/context.rs
+++ b/src/api/wayland/context.rs
@@ -86,7 +86,7 @@ impl WaylandContext {
if let Some(sid) = sid {
let map = event_queues.lock().unwrap();
if let Some(queue) = map.get(&sid) {
- queue.lock().unwrap().push_back(Event::Moved(x as i32,y as i32))
+ queue.lock().unwrap().push_back(Event::MouseMoved((x as i32,y as i32)))
}
}
});
@@ -218,4 +218,11 @@ impl WaylandContext {
p.lock().unwrap().remove_handled_surface(sid);
}
}
-} \ No newline at end of file
+
+ pub fn push_event_for(&self, sid: SurfaceId, evt: Event) {
+ let mut guard = self.windows_event_queues.lock().unwrap();
+ if let Some(queue) = guard.get(&sid) {
+ queue.lock().unwrap().push_back(evt);
+ }
+ }
+}