MicrosoftEdge / MicrosoftEdge/WebView2Feedback

WinForms (DpiUnawareGdiScaled): control renders in wrong location on scaled monitor

Open
#2,705 4 comments 1 reaction 1 assignee View on GitHub

Nobody has claimed this yet.

bug tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

This is in reference to #1700 which, with V105, corrected the size of WebView2 on a scaled monitor.
However, the offset in relation to the application window is still not correct.
(We have various legacy components which tie us to DpiUnawareGdiScaled for the time being.)

See screenshots below.
Only the rendered pixels are in the wrong location - mouse events behave as if the controls are positioned correctly. (I.e. I have to click a lot to the right and a bit down from what I see onscreen.)

Version
SDK: 1.0.1293.44
Runtime: Beta 105.0.1343.10
Framework: WinForms
OS: Win11

Repro Steps
Create a WinForms app, use DpiUnawareGdiScaled
Embed a WebView2 control at an offset within the main app Form (e.g. within a TabPage)
Launch, and move between unscaled/scaled monitors

Screenshots
On an unscaled monitor (the little gear button is the top left of the WebView2 content):
image
On a 150% scaled monitor with version 105 (notice that the position is incorrect):
image
On a 150% scaled monitor before version 105 (for reference only, notice that v105 corrects size, not position):
image

AB#48526450

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.