From a337eca81109f546763b9df1c103f789879e450f Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 12:32:31 -0700 Subject: [PATCH] refactor(windows): Window implements WorkspaceWindow BEHAVIOUR (Windows runtime): none; the four lookups of komorebi-core's WorkspaceWindow forward to Window's own title, exe, class and path and nothing calls them through the trait yet. Windows e2e: none needed. Verified: Windows clippy --workspace --locked --all-targets -D warnings: PASS. Not run: Windows tests, e2e. --- komorebi/src/container.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/komorebi/src/container.rs b/komorebi/src/container.rs index 92dc5341..0dc51466 100644 --- a/komorebi/src/container.rs +++ b/komorebi/src/container.rs @@ -7,6 +7,7 @@ use crate::window::Window; use crate::windows_backend::backend; use komorebi_backend::WindowId; use komorebi_core::ContainerWindow; +use komorebi_core::WorkspaceWindow; /// The windows that share one tile of a workspace's layout pub type Container = komorebi_core::Container; @@ -39,6 +40,24 @@ impl ContainerWindow for Window { } } +impl WorkspaceWindow for Window { + fn title(&self) -> Option { + Window::title(*self) + } + + fn exe(&self) -> Option { + Window::exe(*self) + } + + fn class(&self) -> Option { + Window::class(*self) + } + + fn path(&self) -> Option { + Window::path(*self) + } +} + /// What only the Windows container has pub trait ContainerExt { /// The handle of the first window of the executable `exe` in this container