mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 09:38:32 +02:00
fix(wm): prevent ghost active border on empty ws
This commit ensures that a "ghost border" will not be drawn when switching to empty workspaces if active_window_border = true.
This commit is contained in:
@@ -212,12 +212,16 @@ impl WindowManager {
|
|||||||
|
|
||||||
#[tracing::instrument(skip(self))]
|
#[tracing::instrument(skip(self))]
|
||||||
pub fn show_border(&self) -> Result<()> {
|
pub fn show_border(&self) -> Result<()> {
|
||||||
let foreground = WindowsApi::foreground_window()?;
|
if self.focused_container().is_ok() {
|
||||||
let foreground_window = Window { hwnd: foreground };
|
let foreground = WindowsApi::foreground_window()?;
|
||||||
|
let foreground_window = Window { hwnd: foreground };
|
||||||
|
|
||||||
let border = Border::from(BORDER_HWND.load(Ordering::SeqCst));
|
let border = Border::from(BORDER_HWND.load(Ordering::SeqCst));
|
||||||
border.set_position(foreground_window, true)?;
|
border.set_position(foreground_window, true)?;
|
||||||
WindowsApi::invalidate_border_rect()
|
WindowsApi::invalidate_border_rect()?;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tracing::instrument(skip(self))]
|
#[tracing::instrument(skip(self))]
|
||||||
|
|||||||
Reference in New Issue
Block a user