Skip to content
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

Maximize on HiDPI monitor doesn't work as expected #542

Open
vchirikov opened this issue Mar 11, 2023 · 4 comments
Open

Maximize on HiDPI monitor doesn't work as expected #542

vchirikov opened this issue Mar 11, 2023 · 4 comments

Comments

@vchirikov
Copy link
Contributor

Hi I have three monitors, 2 of them 2560x1440 with 100% scale and third has 200% scale and 3840x2160 resolution and on third monitor I had a issue. Maximize window only works on a half of the monitor:

issue.webm
@vchirikov
Copy link
Contributor Author

Looks like you use one DPI for all monitors

https://github.com/cairoshell/ManagedShell/blob/aec89f11a7cb227addf6669df6ee1884491aa76d/src/ManagedShell.Common/Helpers/DpiHelper.cs#L72-L78

which isn't true, each monitor might have different dpi scale

@vchirikov
Copy link
Contributor Author

Oh, I see you try to get WM_DPICHANGED later, but looks like it's doesn't work well.
https://source.dot.net/#PresentationFramework/System/Windows/Window.cs,c9ce03bb401c4790,references
Maybe this could help to do it right without WM_DPICHANGED hack?
cc: @dremin

@ejrv
Copy link
Contributor

ejrv commented Mar 12, 2023

bro replies to himself 💀

@dremin
Copy link
Owner

dremin commented Mar 12, 2023

@vchirikov I've seen this bug as well, I suspect either we are telling Windows incorrect appbar metrics, or there is a new bug in Explorer's appbar implementation with mixed DPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants