refactor(kde): WorkspaceGlobals is komorebi-core's

komorebi-for-kde's workspace.rs re-exports komorebi_core::WorkspaceGlobals
instead of defining it (crate::workspace::WorkspaceGlobals keeps working
for monitor.rs and the tests). Same fields, same derives. No behaviour
change.

Verified: KDE cargo test -p komorebi --lib --tests (native, lite env):
630 passed, 0 failed. Not run: doc tests, VM suites.
This commit is contained in:
LGUG2Z committed 2026-10-31 12:14:35 -07:00
1 parent 88afd37d36
commit 68b661a4ec
2 files changed
+3 -17

No files matched your search

+2
View File
@@ -2577,6 +2577,8 @@ name = "komorebi-core"
version = "0.1.42"
dependencies = [
"komorebi-collections",
"komorebi-config",
"komorebi-layouts",
"nanoid",
"schemars 1.2.3",
"serde",
+1 -17
View File
@@ -42,6 +42,7 @@ use color_eyre::eyre;
use color_eyre::eyre::OptionExt;
use komorebi_backend::MonitorId;
use komorebi_backend::WindowId;
pub use komorebi_core::WorkspaceGlobals;
use komorebi_scrolling::ScrollingSpace;
use komorebi_themes::KomorebiTheme;
use komorebi_themes::KomorebiThemeCustom;
@@ -218,23 +219,6 @@ pub enum WorkspaceWindowLocation {
Floating(usize), // idx in floating_windows
}
#[derive(Debug, Default, Copy, Clone, Serialize, Deserialize, PartialEq)]
/// The work area a monitor gives the workspace it shows, the padding and the offset the
/// workspace falls back to when it sets none of its own, the monitor's window-based offset, and
/// the room around each window that a border drawn by the compositor takes
pub struct WorkspaceGlobals {
pub container_padding: Option<i32>,
pub workspace_padding: Option<i32>,
pub border_width: i32,
pub border_offset: i32,
pub work_area: Rect,
pub work_area_offset: Option<Rect>,
pub window_based_work_area_offset: Option<Rect>,
pub window_based_work_area_offset_limit: isize,
/// The floating layer behaviour of the monitor, which the workspace's own overrides
pub floating_layer_behaviour: Option<FloatingLayerBehaviour>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
/// Cached per-layout default options (pre-sorted rules) derived from the global `layout_defaults`.
pub(crate) struct CachedLayoutDefault {