Skip to content

Fixed invalid monitor detection when changing window position #18562

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 1 commit into from
Mar 31, 2025

Conversation

kekekeks
Copy link
Member

A regression got introduced by #16158 that would cause a window to jump between DPIs when showing.

Regression is caused by using a random API to get the window's monitor instead of one specifically designated for getting a window's monitor

@MrJul
Copy link
Member

MrJul commented Mar 31, 2025

Tested with two monitors with different DPI scaling, with a window overlapping both.
The window now has the correct size.

(Note: we unfortunately can't add an integration test for scenarios involving multiple monitors.)

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0055847-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul marked this pull request as ready for review March 31, 2025 20:44
@MrJul MrJul added this pull request to the merge queue Mar 31, 2025
Merged via the queue into master with commit 8e8ee24 Mar 31, 2025
12 checks passed
@MrJul MrJul deleted the fixes/win32-wrong-initial-dpi branch March 31, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants