From 401ce9112a2249f71c455a24eae2d9ff92bda7da Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 19:13:38 -0700 Subject: [PATCH] refactor(core): Workspace::hide_spot and hide_spot_on_display as methods Convenience for the callers that have a workspace and no platform type to name (the window manager functions, which are the same text on KDE and macOS): the same as P::hide_spot(self) and P::hide_spot_on_display(self). Nothing calls them yet in the KDE and Windows daemons; no behaviour change. Verified: native cargo test -p komorebi-core passes; fast-check all trees PASS. --- crates/komorebi-core/src/workspace.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/komorebi-core/src/workspace.rs b/crates/komorebi-core/src/workspace.rs index 9462957d..31e45ebb 100644 --- a/crates/komorebi-core/src/workspace.rs +++ b/crates/komorebi-core/src/workspace.rs @@ -473,6 +473,18 @@ pub fn resolve_threshold_match( } impl Workspace

{ + /// Where the windows of this workspace are hidden ([`WorkspacePlatform::hide_spot`]), for the + /// calls that hide or stack a window + pub fn hide_spot(&self) -> PlatformHideSpot

{ + P::hide_spot(self) + } + + /// Where the containers of this workspace are hidden when the whole workspace is + /// ([`WorkspacePlatform::hide_spot_on_display`]) + pub fn hide_spot_on_display(&self) -> PlatformHideSpot

{ + P::hide_spot_on_display(self) + } + /// The containers of the workspace. pub const fn containers(&self) -> &std::collections::VecDeque> { self.containers.elements()