-
Notifications
You must be signed in to change notification settings - Fork 797
Fix DPI scaling for embedded PuTTY and PowerShell windows on multi-monitor setups #3352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
61b55c6
Initial plan
Copilot 60b7562
Fix DPI scaling for embedded PuTTY and PowerShell windows
Copilot 90bd9b4
Send WM_DPICHANGED_AFTERPARENT to embedded window on DPI change
Copilot 98f6172
Fix cross-process DPI scaling: send WM_DPICHANGED with explicit DPI t…
Copilot 06a543a
DPI fix: detach/reattach embedded window so Windows delivers WM_DPICH…
Copilot 8310b30
DPI fix: SetThreadDpiHostingBehavior + visible detach/reattach for Pu…
Copilot 21a2be8
Fix PowerShell initial DPI + PuTTY WS_POPUP/window-size for reliable …
Copilot fd46a3d
Fix: PuTTY DPI issues
BornToBeRoot 96adce7
Chore: Refactoring / cleanup
BornToBeRoot 51ab08a
Fix: Initial size
BornToBeRoot b1cad9a
Blog: Add technical article on high DPI for embedded processes (conho…
Copilot 5a77943
Cleanup: remove unused constants, DPI_HOSTING_BEHAVIOR enum, and SetT…
Copilot 440e7e8
Add DPI/font scaling and initial size bug fix entries to next-release…
Copilot 8389c17
Update blog post: add C#/WPF mention, XAML snippet, inline comments, …
Copilot a5c76d1
Docs: Add descriptions to blog entries
BornToBeRoot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
1 change: 1 addition & 0 deletions
1
Website/blog/2024-05-24-introducing-code-signing-to-binaries/index.md
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
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
1 change: 1 addition & 0 deletions
1
...e/blog/2025-10-19-streamlined-profile-management-with-tags-and-filters/index.md
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
1 change: 1 addition & 0 deletions
1
Website/blog/2025-10-23-improved-light-theme-readability/index.md
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
1 change: 1 addition & 0 deletions
1
Website/blog/2026-02-22-system-wide-policies-for-enterprise-deployments/index.md
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description details a specific PuTTY DPI fix that involves: (1) extracting a
TriggerDpiUpdateAsync()method, (2) temporarily restoringWS_POPUPbefore callingSetParent(null)so Windows recognises the window as a top-level popup and deliversWM_DPICHANGED, and (3) sizing the detached window to 800×600 to exceed Windows's monitor-DPI detection threshold. None of these are actually implemented.The PR description explicitly states that without
WS_POPUPthe window has no recognised top-level style and "Windows never queuesWM_DPICHANGEDfor it." Yet the actual implementation inWindowsFormsHost_DpiChangedsimply callsTrySendDpiChangedMessageon the already-embedded child window (which no longer hasWS_POPUP), without any detach/reattach cycle. This contradicts the stated root cause.If the described root cause is correct, the current implementation—sending
WM_DPICHANGEDdirectly while the window is aWS_CHILDembedded window withoutWS_POPUP—may not be effective for PuTTY DPI rescaling.