diff --git a/src/config/frontend.rs b/src/config/frontend.rs new file mode 100644 index 000000000..7e707ad28 --- /dev/null +++ b/src/config/frontend.rs @@ -0,0 +1,17 @@ +use super::*; + +#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)] +pub enum FrontEndSelection { + OpenGL, + Software, + OldSoftware, + MuxServer, + Null, +} +impl_lua_conversion!(FrontEndSelection); + +impl Default for FrontEndSelection { + fn default() -> Self { + FrontEndSelection::OpenGL + } +} diff --git a/src/config/mod.rs b/src/config/mod.rs index 9df1ce5fb..33ced9bb9 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -5,7 +5,6 @@ use crate::create_user_owned_dirs; use crate::font::locator::FontLocatorSelection; use crate::font::rasterizer::FontRasterizerSelection; use crate::font::shaper::FontShaperSelection; -use crate::frontend::FrontEndSelection; use anyhow::{anyhow, bail, Context, Error}; use lazy_static::lazy_static; use luahelper::impl_lua_conversion; @@ -27,6 +26,7 @@ use toml; mod color; mod daemon; mod font; +mod frontend; pub mod keyassignment; mod keys; mod ssh; @@ -36,6 +36,7 @@ mod unix; pub use color::*; pub use daemon::*; pub use font::*; +pub use frontend::*; pub use keys::*; pub use ssh::*; pub use terminal::*; diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index 0a03da6b0..0e93600fe 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -3,8 +3,6 @@ use crate::mux::tab::Tab; use crate::mux::window::WindowId; use anyhow::{anyhow, Error}; use downcast_rs::{impl_downcast, Downcast}; -use luahelper::impl_lua_conversion; -use serde::{Deserialize, Serialize}; use std::cell::RefCell; use std::rc::Rc; use std::sync::atomic::{AtomicBool, Ordering}; @@ -13,21 +11,7 @@ pub mod activity; pub mod gui; pub mod muxserver; -#[derive(Debug, Deserialize, Serialize, Clone, Copy, PartialEq, Eq)] -pub enum FrontEndSelection { - OpenGL, - Software, - OldSoftware, - MuxServer, - Null, -} -impl_lua_conversion!(FrontEndSelection); - -impl Default for FrontEndSelection { - fn default() -> Self { - FrontEndSelection::OpenGL - } -} +pub use crate::config::FrontEndSelection; thread_local! { static FRONT_END: RefCell>> = RefCell::new(None);