get rid of redundant names
This commit is contained in:
parent
79180de71b
commit
4021768e48
4 changed files with 20 additions and 11 deletions
|
@ -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
17
src/input/manager.rs
Normal 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))
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
mod input_manager;
|
||||
mod manager;
|
||||
mod keyboard;
|
||||
|
||||
pub use self::input_manager::*;
|
||||
pub use self::manager::*;
|
||||
pub use self::keyboard::*;
|
||||
|
|
|
@ -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(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue