From 9bc99f5f1c997ae3dabb3ba1d7e87026daff0024 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 16 Feb 2019 08:54:24 -0800 Subject: [PATCH] tweak windows imports --- Cargo.toml | 2 +- src/guiloop/glutinloop.rs | 1 + src/guiloop/mod.rs | 10 +++++----- src/main.rs | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d55a9fe63..4a021ccf6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ x11 = {version ="~2.17", features = ["xlib_xcb"]} [target.'cfg(any(target_os = "android", windows, all(unix, not(target_os = "macos"))))'.dependencies.glium] version = "~0.20" default-features = false -features = [] +features = ["glutin"] [target.'cfg(all(unix, not(target_os = "macos")))'.dependencies.xcb] version = "~0.8" diff --git a/src/guiloop/glutinloop.rs b/src/guiloop/glutinloop.rs index dfe126a2b..e46421e63 100644 --- a/src/guiloop/glutinloop.rs +++ b/src/guiloop/glutinloop.rs @@ -6,6 +6,7 @@ use mio; use mio::{PollOpt, Ready, Token}; use std::cell::RefCell; use std::collections::HashMap; +#[cfg(unix)] use std::os::unix::io::RawFd; use std::rc::Rc; use std::sync::mpsc::{self, Receiver, Sender, TryRecvError}; diff --git a/src/guiloop/mod.rs b/src/guiloop/mod.rs index ccdc2aa58..0c6a9a2af 100644 --- a/src/guiloop/mod.rs +++ b/src/guiloop/mod.rs @@ -1,19 +1,19 @@ use failure::Error; use std::process::ExitStatus; -#[cfg(target_os = "macos")] +#[cfg(any(windows, target_os = "macos"))] mod glutinloop; -#[cfg(target_os = "macos")] +#[cfg(any(windows, target_os = "macos"))] pub use glutinloop::{GuiEventLoop, GuiSender}; -#[cfg(target_os = "macos")] +#[cfg(any(windows, target_os = "macos"))] pub use gliumwindows::TerminalWindow; -#[cfg(target_os = "macos")] +#[cfg(any(windows, target_os = "macos"))] pub use mpsc::Receiver as GuiReceiver; -#[cfg(target_os = "macos")] +#[cfg(any(windows, target_os = "macos"))] pub use glium::glutin::WindowId; #[cfg(all(unix, not(target_os = "macos")))] diff --git a/src/main.rs b/src/main.rs index e03faaf39..4ed6021fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,11 +51,11 @@ mod config; mod futurecore; mod opengl; -#[cfg(target_os = "macos")] +#[cfg(any(windows,target_os = "macos"))] mod remotemio; mod clipboard; -#[cfg(target_os = "macos")] +#[cfg(any(windows,target_os = "macos"))] mod gliumwindows; mod guiloop;