diff --git a/src/backend/libinput.rs b/src/backend/libinput.rs index 5cfa336..1a5d3b2 100644 --- a/src/backend/libinput.rs +++ b/src/backend/libinput.rs @@ -22,6 +22,22 @@ pub struct LibinputInputBackend { logger: ::slog::Logger, } +impl LibinputInputBackend { + pub fn new(context: Libinput, logger: L) -> Self + where L: Into> + { + let log = ::slog_or_stdlog(logger).new(o!("smithay_module" => "backend_libinput")); + info!(log, "Initializing a libinput backend"); + LibinputInputBackend { + context: context, + devices: Vec::new(), + seats: HashMap::new(), + handler: None, + logger: log, + } + } +} + impl InputBackend for LibinputInputBackend { type InputConfig = [Device]; type EventError = IoError;