Files
komorebi/komorebi
LGUG2Z b12be4b1a7 refactor(windows): move window_handling_behaviour to the platform settings, scoped guard in the border test
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.
2026-11-05 15:03:26 -08:00
..
2025-01-08 21:39:21 -08:00