get rid of redundant names

This commit is contained in:
buffet 2019-01-11 09:14:59 +01:00
parent 39364c0234
commit 8f384f9b67
4 changed files with 20 additions and 11 deletions

View file

@ -1,8 +0,0 @@
use crate::input::Keyboard;
use wlroots::input;
pub fn input_manager() -> input::manager::Builder {
input::manager::Builder::default()
.keyboard_added(|_compositor_handle, _keyboard_handle| Some(Box::new(Keyboard)))
}

17
src/input/manager.rs Normal file
View file

@ -0,0 +1,17 @@
use crate::input::Keyboard;
use wlroots::{
compositor,
input::{self, keyboard},
};
pub fn manager() -> input::manager::Builder {
input::manager::Builder::default().keyboard_added(keyboard_added)
}
fn keyboard_added(
_compositor_handle: compositor::Handle,
_keyboard_handle: keyboard::Handle,
) -> Option<Box<keyboard::Handler>> {
Some(Box::new(Keyboard))
}

View file

@ -1,5 +1,5 @@
mod input_manager;
mod manager;
mod keyboard;
pub use self::input_manager::*;
pub use self::manager::*;
pub use self::keyboard::*;

View file

@ -25,6 +25,6 @@ fn build_compositor() -> compositor::Compositor {
compositor::Builder::new()
.gles2(true)
.data_device(true)
.input_manager(input::input_manager())
.input_manager(input::manager())
.build_auto(())
}