linux: Remove dead code from wayland & fix some trivial warnings.

This commit is contained in:
Victor Berger 2017-03-04 11:14:08 +01:00
parent 4e75c1e668
commit 9aaa788434
7 changed files with 25 additions and 89 deletions

View file

@ -1,13 +1,12 @@
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))]
pub use self::window::{PollEventsIterator, WaitEventsIterator, Window, WindowProxy};
use self::window::Window;
pub use self::context::{WaylandContext, MonitorId, get_available_monitors,
get_primary_monitor};
extern crate wayland_kbd;
extern crate wayland_window;
use platform::PlatformSpecificWindowBuilderAttributes;
use CreationError;
use std::sync::Arc;
@ -43,7 +42,7 @@ impl EventsLoop {
pub fn poll_events<F>(&self, mut callback: F)
where F: FnMut(::Event)
{
let mut windows = self.windows.lock().unwrap();
let windows = self.windows.lock().unwrap();
for window in windows.iter() {
for event in window.poll_events() {
callback(::Event::WindowEvent {
@ -62,7 +61,7 @@ impl EventsLoop {
// Yeah that's a very bad implementation.
loop {
self.poll_events(|e| callback(e));
::std::thread::sleep_ms(5);
::std::thread::sleep(::std::time::Duration::from_millis(5));
if self.interrupted.load(::std::sync::atomic::Ordering::Relaxed) {
break;
}