Repository navigation
Fix fly-away target computation to exit the full virtual desktop in mixed-orientation multi-monitor setups - #60
Draft
shanselman with Copilot wants to merge 5 commits into
Draft
shanselman with Copilot wants to merge 5 commits into
shanselman with Copilot wants to merge 5 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix fly away animation positions window incorrectly in multi-monitor setup
Fix fly-away target computation to exit the full virtual desktop in mixed-orientation multi-monitor setups
May 12, 2026
Owner
|
Triage note: this is plausible, but it needs human/manual validation because the bug is specifically mixed-orientation multi-monitor Fly Away behavior. I would not take this automatically until someone verifies at least: horizontal+vertical monitor layout, windows fully leave the virtual desktop in each direction, restore still returns windows to original positions, and single-monitor behavior is unchanged. |
Enumerate the live monitor topology once, choose the shortest one-axis target with conservative clearance from every display, and cover arbitrary layouts with deterministic fuzz and an independent exhaustive oracle. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Owner
|
The branch is now current with Production behavior now:
Validation:
No blocking geometry findings remain. This should stay draft until #74 is merged and a human verifies mixed-DPI/mixed-orientation hardware, hot-plug behavior, restore accuracy, and a Task Manager kill during Fly Away. |
Bring the Windows pull-request validation gate onto this active branch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug Fix
What was the bug?
In mixed-orientation multi-monitor layouts, Fly Away computed end positions relative to only the source monitor’s work area.
That could place windows “off” one monitor but still visible on another (e.g., lower half of a vertical secondary display).
How did you fix it?
Target-space correction (monitor-local ➜ virtual desktop)
Interop support
GetSystemMetricsconstants inNativeMethods:SM_XVIRTUALSCREEN,SM_YVIRTUALSCREENSM_CXVIRTUALSCREEN,SM_CYVIRTUALSCREENWindowTracker change
GetVirtualScreenBounds()and used it inComputeFlyAwayTarget(...)when calculating finaltargetLeft/targetTop.