From 87673d7ecce661f3b8c5db949e70640934a55de9 Mon Sep 17 00:00:00 2001 From: MaxVerevkin Date: Thu, 7 Sep 2023 16:31:06 +0300 Subject: some refactoring --- src/wm_info_provider.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/wm_info_provider.rs') diff --git a/src/wm_info_provider.rs b/src/wm_info_provider.rs index e1004fa..25eef05 100644 --- a/src/wm_info_provider.rs +++ b/src/wm_info_provider.rs @@ -17,12 +17,18 @@ mod hyprland; pub use hyprland::*; pub trait WmInfoProvider { - fn new_ouput(&mut self, conn: &mut Connection, output: WlOutput); - fn output_removed(&mut self, conn: &mut Connection, output: WlOutput); + fn register(&self, _: &mut EventLoop) {} + + fn new_ouput(&mut self, _: &mut Connection, _: &Output) {} + fn output_removed(&mut self, _: &mut Connection, _: &Output) {} fn get_tags(&self, output: &Output) -> Vec; - fn get_layout_name(&self, output: &Output) -> Option; - fn get_mode_name(&self, output: &Output) -> Option; + fn get_layout_name(&self, _: &Output) -> Option { + None + } + fn get_mode_name(&self, _: &Output) -> Option { + None + } fn click_on_tag( &mut self, @@ -39,14 +45,13 @@ pub trait WmInfoProvider { pub fn bind( conn: &mut Connection, globals: &Globals, - event_loop: &mut EventLoop<(Connection, State)>, config: &WmConfig, ) -> Option> { if let Some(river) = RiverInfoProvider::bind(conn, globals, config) { return Some(Box::new(river)); } - if let Some(hyprland) = Hyprland::new(event_loop) { + if let Some(hyprland) = Hyprland::new() { return Some(Box::new(hyprland)); } -- cgit v1.3.1