fix: keep sticky layout indicator visible when pinned - #145
Conversation
kissetfall
left a comment
There was a problem hiding this comment.
The window-level and resizability changes are structurally sound, and a synthetic merge onto current main passed 570/570 tests, i18n, and Clippy. One macOS state transition still needs to be made symmetrical.
Pinning calls setHidesOnDeactivate: false, but unpinning sends only WindowLevel(Normal) and Resizable(true). The native hidesOnDeactivate property therefore remains changed for the lifetime of the viewport: after a pin → unpin cycle, the unpinned indicator does not return to its previous deactivation behavior.
Please restore the native property appropriate to the unpinned state (preferably through one helper that applies both sides of the pin transition, rather than a pin-only native call) and cover the transition contract where possible.
After rebasing onto current main, please run native smoke tests on Windows, macOS, and Linux for: initial pinned launch, focus loss, pin → unpin, resize restoration, close/reopen, and persisted state. On macOS, explicitly verify both deactivation behavior and window ordering after unpin.
Problem
When pinned, the sticky Layout Indicator can disappear behind another application's window after Entropy loses focus. It also remains resizable, so its saved size can change while the user expects it to stay fixed.
Fix
Verification
cargo test layout_indicator_window— 2 passed.rustfmt --check src/ui/layout_indicator_window.rsandgit diff --checkpassed.origin/mainbase remains blocked by existing HID/task timing failures: 486 passed / 18 failed in parallel, and 501 passed / 3 failed single-threaded.