From f616e3a1c6dacca7213c9d79da69777776e7f863 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 12:09:31 -0700 Subject: [PATCH] refactor(windows): WorkspaceGlobals is komorebi-core's komorebi/src/workspace.rs re-exports komorebi_core::WorkspaceGlobals instead of defining it (crate::workspace::WorkspaceGlobals keeps working for monitor.rs). Same nine fields, same derives, same schemars derive. BEHAVIOUR (Windows runtime): none expected, the type is plain data and its serialisation is skipped in Workspace; marked because it was only type-checked. Windows e2e scenarios: any that read komorebic state (tiled, stack, float fixtures) and the schema check. Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings: PASS; komorebi-core tests PASS. Not run: Windows tests, e2e. --- komorebi/src/workspace.rs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/komorebi/src/workspace.rs b/komorebi/src/workspace.rs index 5a9c7e01..61cdfa50 100644 --- a/komorebi/src/workspace.rs +++ b/komorebi/src/workspace.rs @@ -52,6 +52,7 @@ use color_eyre::eyre; use color_eyre::eyre::OptionExt; use komorebi_backend::WindowId; use komorebi_core::ContainerWindow; +pub use komorebi_core::WorkspaceGlobals; use komorebi_scrolling::ScrollingSpace; use komorebi_themes::Base16ColourPalette; use komorebi_themes::KomorebiThemeCustom as Custom; @@ -183,21 +184,6 @@ pub enum WorkspaceWindowLocation { Floating(usize), // idx in floating_windows } -#[derive(Debug, Default, Copy, Clone, Serialize, Deserialize, PartialEq)] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] -/// Settings setup either by the parent monitor or by the `WindowManager` -pub struct WorkspaceGlobals { - pub container_padding: Option, - pub workspace_padding: Option, - pub border_width: i32, - pub border_offset: i32, - pub work_area: Rect, - pub work_area_offset: Option, - pub window_based_work_area_offset: Option, - pub window_based_work_area_offset_limit: isize, - pub floating_layer_behaviour: Option, -} - #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] /// Cached per-layout default options (pre-sorted rules) derived from the global `layout_defaults`. pub(crate) struct CachedLayoutDefault {