diff --git a/docs/dev/macos-handcheck.md b/docs/dev/macos-handcheck.md index 8513a57d..758335ac 100644 --- a/docs/dev/macos-handcheck.md +++ b/docs/dev/macos-handcheck.md @@ -148,3 +148,11 @@ F. In `window.rs` `AdhocWindow::hide` / `Window::hide` duplicate the restore-pos ## E. What is not checked at all Everything above. In particular: no macOS test (399+ unit tests incl. those in window.rs for drag state) has run against any of these revisions; the unified binaries do not exist yet; no real Accessibility call was made; `komorebi-recorder` captures need a Mac. + +## F. Settings: S3 and S5 (wip-u-settings3 and earlier), appended by the settings agent + +Type-check and clippy only; nothing here ran on a Mac. The settings now live in `settings()` (one snapshot per use); the process-wide statics for these groups are gone. + +1. **S3 groups (paddings, floating aspect ratio, `layout_defaults`, `display_index_preferences`).** Config with `default_workspace_padding` 20 and `default_container_padding` 15: tiles 20 px from the work area, 15 apart. Reload with the key dropped: padding stays (merge); set it to 5 and reload: 5. `layout_defaults`: set, reload, workspaces use it; remove and reload: they fall back (the key resets). Aspect ratio: `toggle-float` with centring uses the configured ratio; remove the key and reload: 4:3 (Standard). `display_index_preference 0 `: monitor order follows it. Reload during a drag or workspace switch: no one-frame flash of half-new padding. +2. **S5 animation (BEHAVIOUR: one snapshot for enabled, duration, style and fps).** Animation on (`komorebic animation true`), switch workspace: transition plays. While a transition runs, `komorebic animation-duration 1000`, then `animation-style`, then `animation false`: the running transition is not torn (no mix of old duration with new style), the next one follows the new values. Per-kind: `animation true --movement`, `animation false` (global): per-kind values are cleared by a global value, so movement is off again. Reload a file with `"animation": {"enabled": {"movement": true}}`: only movement animates and the global flag is untouched; reload a file with `"animation": {"enabled": true}` (no fps): fps back to 60; reload a file with no animation block: all animation settings keep their values. `komorebic animation-fps 30` then watch frame cadence. Stack a window (`stack`): no animation during the stack (the `suspend()` counter, unchanged), and animation is back after it, including after a stack command that fails. +3. The border and transparency groups (S6, S4) are not moved on macOS: transparency does not exist there. diff --git a/docs/dev/settings.md b/docs/dev/settings.md index da70d486..e7442380 100644 --- a/docs/dev/settings.md +++ b/docs/dev/settings.md @@ -332,3 +332,28 @@ all three daemons: statics removed, `apply_globals` applies them with one `Handl `display_index_preferences()`), each a clone from one snapshot. The only BEHAVIOUR is the single publish. Note the KDE integration test harness (`tests/config.rs`) now resets the paddings through `settings()`; it is the oracle that loads configurations over a fake desktop. + +## 10. S4 and S5 as landed on `wip-u-settings3`, and what writing them showed + +S4 (transparency enabled and alpha; KDE and Windows, macOS has none) and S5 (animation) moved the groups +with their writers and readers, KDE first, then macOS (S5 only), then Windows. Per-revision gates are in +the commit bodies. Differences between the daemons that the migration keeps, and that a later unification +must decide on purpose: + +* **Transparency on load:** KDE resets both keys when absent (`unwrap_or(false)`, `unwrap_or(200)`); + Windows keeps the value. Both go through `SharedDelta::apply`; KDE builds its delta with `Some(unwrap_or(..))`. + (The earlier table in section 2.1 said "kept" for both: corrected here.) +* **When is a kind of animation on?** KDE and macOS: the per-kind value wins over the global one + (`Animation::motion_for`). Windows: the global flag OR a per-kind true (a per-kind false does not turn off a + global true), for window moves and the transparency animation; its workspace-transition helpers keep the + per-kind-wins rule. The Windows accessors (`animation_enabled_for`, `animation_for`) encode its rule. +* **Save-and-restore of the global animation flag:** KDE's stacking commands now hold + `settings::animation_off()` (`Handle::scoped` on the global flag only, as the old swap did: per-kind values + are not suspended), which also restores on an early error return. macOS keeps its `suspend()` counter + (suspends every kind). Windows has no such write in the daemon; its shutdown path is the permanent + `animation_off_for_good()`. Windows `WINDOW_HANDLING_BEHAVIOUR` moved to `WindowsSettings` and its one + save-and-restore (the border paint test) uses `scoped`. +* The old Windows window-move code held the per-kind enabled map's lock for the rest of the function while + animating; it now takes one snapshot and holds nothing. + +S6 (borders) is next and is not started.