diff --git a/komorebi/src/stackbar.rs b/komorebi/src/stackbar.rs index 569eed25..de7facb7 100644 --- a/komorebi/src/stackbar.rs +++ b/komorebi/src/stackbar.rs @@ -55,8 +55,6 @@ use komorebi_core::Rect; use crate::window::Window; use crate::windows_api::WindowsApi; -use crate::winevent_listener::event_tx; -use crate::WindowManagerEvent; use crate::DEFAULT_CONTAINER_PADDING; use crate::STACKBAR_FOCUSED_TEXT_COLOUR; use crate::STACKBAR_TAB_BACKGROUND_COLOUR; @@ -115,6 +113,7 @@ impl Stackbar { if x >= left && x <= right && y >= top && y <= bottom { let window = Window { hwnd: *win_hwnd }; + window.restore(); if let Err(err) = window.focus(false) { tracing::error!("Stackbar focus error: HWND:{} {}", *win_hwnd, err); } diff --git a/komorebi/src/window.rs b/komorebi/src/window.rs index 5857ae89..11539b0e 100644 --- a/komorebi/src/window.rs +++ b/komorebi/src/window.rs @@ -323,7 +323,7 @@ impl Window { return Ok(false); } - let is_cloaked = self.is_cloaked()?; + let is_cloaked = self.is_cloaked().unwrap_or_default(); let mut allow_cloaked = false;