mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-12-05 06:26:30 +01:00
Plan step 10, part of S7 and the scoped guard asked for in S5. WINDOW_HANDLING_BEHAVIOUR is no longer a static: it is settings().platform.window_handling_behaviour (WindowsSettings, default Sync). The load writes it with one update when the key is present (a missing key keeps it, as before); windows_api (the position calls) and scrolling read it through settings::window_handling_behaviour(), once per call. The border paint test (border_manager/border.rs is_painted) saved the static, stored a value and stored the old one back, which overwrote any change made in between. It now holds Handle::scoped on the field, which puts the previous value back on drop only if the field still holds the value it set. BEHAVIOUR: the position calls read a snapshot instead of an atomic cell (one RwLock read and Arc clone per call), and the load publishes the key through the handle. Gate: Windows e2e (commands, config_reload, lifecycle; anything that moves windows with window_handling_behaviour async if configured). Verified: Windows clippy -D warnings --locked --all-targets on komorebi-windows (cross): clean. e2e not run; the border paint test needs a desktop and was not run.