mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-14 12:53:43 +01:00
New crate crates/komorebi-core, a member of the root workspace (KDE and macOS take it by path when they adopt it). It holds Container<W>, moved from komorebi-for-kde/komorebi/src/container.rs (KDE is the base) and made generic: W is any type that implements ContainerWindow, a small trait for what the container asks of a platform window (its id, the executable name, hide and restore, and the hide and restore that load_focused_window uses, which on Windows leave the border alone). Container keeps no Backend calls; hiding and restoring is the window's own business. The serialised form is unchanged: id, locked (which may be missing when read, as on Windows), windows with elements and focused. The schemars schema of Container<W> is named Container whatever W is (schemars(rename)), so schema.json keeps its definition name; a test checks it. The tests of container.rs that need no daemon moved with it, over a stub window, plus tests for the JSON, the hide/restore calls and the missing locked field. No daemon uses it yet: the next revisions converge KDE and Windows. Verified: cargo test -p komorebi-core --features schemars (native): 13 passed, 0 failed. Not run: Windows, KDE, macOS builds (nothing depends on the crate yet).