MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: Webview2 Not position on High scaled monitor when gdiScaling is DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED

Open
#4,459 14 comments 0 reactions 0 assignees 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

What happened?

If the monitor scaled is over 100% and the SetProcessDpiAwarenessContext setting is DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED, there is a problem that the rendering window is misplaced, so is there a solution?

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

122.0.2365.92

SDK Version

2470.0

Framework

Win32

Operating System

Windows 10

OS Version

No response

Repro steps
  1. DpiUtil::SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED)
  2. Sample Program Run
Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

AB#50881859

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.

Research direction

Start with the sample program and the DpiUtil::SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED) repro on a monitor scaled above 100%. Compare the WebView2 rendering window position with other DPI awareness settings; done means the window is correctly positioned on the affected Windows 10 setup.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.