Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Backport calling EnableNonClientDpiScaling#285

Merged
zcbenz merged 1 commit intomasterfrom
enable_non_client_dpi_scaling
Apr 17, 2017
Merged

Backport calling EnableNonClientDpiScaling#285
zcbenz merged 1 commit intomasterfrom
enable_non_client_dpi_scaling

Conversation

@alespergl
Copy link
Contributor

This is needed to enable non-client area scaling when the screen DPI changes on Windows 10.
It can be removed after upgrade beyond Chromium 56.

@poiru
Copy link
Contributor

poiru commented Apr 13, 2017

IMO we should just add this to the manifest:

<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2, permonitor</dpiAwareness>

That should be simpler and will be enabled for the entire process instead of just Chromium windows (e.g. for native modules). Unfortunately I don't have a multi-monitor setup I can test with.

@anaisbetts
Copy link
Contributor

This is a good fix but should we just cool our heels for M58 since it's out so soon?

@alespergl
Copy link
Contributor Author

@poiru We'll need to add that to the manifest too, but it's unfortunately not enough for Windows 10 versions before the Creators Update, where calling EnableNonClientDpiScaling is required. I tested that scenario. Plus, this patch will come down eventually from Chromium anyway, at which point we will remove this.

@paulcbetts I'm not pushing for merging this, just making it available in case Chromium 58 gets delayed. @kevinsawicki and @zcbenz have that context, so I'll let them decide whether to merge this or not.
🍰

@zcbenz
Copy link
Contributor

zcbenz commented Apr 17, 2017

It looks good to me to have this in 1.6.x. 👍

@zcbenz zcbenz merged commit 4a0e326 into master Apr 17, 2017
@zcbenz zcbenz deleted the enable_non_client_dpi_scaling branch April 17, 2017 08:38
poiru added a commit to electron/electron that referenced this pull request Apr 18, 2017
This fixes non-client area DPI scaling on recent Windows 10 versions.
See discussion in #8786.
poiru added a commit to electron/electron that referenced this pull request Apr 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants