Repository navigation
Keep the dashboard on its display across sleep and unplug - #30
edward-mcnair wants to merge 1 commit into
Conversation
When the chosen display disappeared (unplugged, or slow to come back after sleep), refreshDisplays() fell back to the first screen and wrote that screen's name over the user's choice, so the dashboard moved to another monitor and stayed there after the display returned. With "Stay on Target Display" on, the filter also excluded NSScreen.main, which is the screen with the key window: once the dashboard was key, its own display stopped being eligible. - The saved display is never replaced by a fallback; availability is resolved separately (DisplaySelection). - Strict mode matches the named display directly, whether or not it is NSScreen.main, and hides the window while it's absent. - While waiting, touch is released and taken back when the display returns. - Retries carry a generation, so a retry from an older topology change, sleep or wake can't act after a newer one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi @kemalandic — when you have a moment, could you approve the CI workflows for this PR and for #31 and #32? As a first-time contributor from a fork, GitHub holds their checks until a maintainer approves them ("Approve and run" on each PR). Each one is independent and mergeable on its own. They're formatted with the repo's |
|
Hi @kemalandic, I was dying to get the XENEON EDGE, but it was PC only. When I heard about the software you created, I had Amazon deliver one the next day. I was thrilled that the software was open source, so I started vibe coding modifications to have it do what I was looking for. I hope you like some of the updates, and that you and others might find them useful. I most certainly do. Each PR (#30–#32 and #34–#42) is small and independent, so feel free to take any of them on their own, or none at all. Thank you for building this! |
What does this PR do?
When the chosen display disappeared (unplugged, or slow to re-enumerate after sleep),
refreshDisplays()fell back to the first screen and wrote that screen's name over the saved choice. The dashboard moved to another monitor and stayed there after the display came back, until relaunch.With Stay on Target Display on, the filter also excluded
NSScreen.main, which is the screen holding the key window, not the menu-bar screen. Once the dashboard was key, its own display stopped being eligible.DisplaySelection).NSScreen.main, and hides the window while the display is absent.Tests:
DisplaySelectionTests(7 cases: unplug, empty wake topology, new display ID and order, focused target, first launch).Verified on a MacBook with two Studio Displays and a XENEON EDGE: unplug and replug, sleep and wake.
Screenshots
No UI change.
Checklist
swift-formatlint clean)Note: built with
swiftcand the new tests run with Swift Testing from the Command Line Tools. Xcode isn't installed on this machine, so CI is the firstxcodebuildrun.🤖 Generated with Claude Code