MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: Tooltips and Select options visible in screenshots/screenshares when using SetWindowDisplayAffinity
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
My requirement was to disable screen capture for a WPF application hosting a WebView2 control. In attempting to fulfill this requirement, I utilized the SetWindowDisplayAffinity function from the WinAPI.
Tooltips (HTML title attributes) and HTML select options within the WebView2 control are visible in screenshots and screenshares, even when they are not intended to be captured. These elements appear above the main window of the WPF application, making them visible in captured content.
Below is the screenshot of the application with the issue. Ideally, the whole screenshot should be black but we can see the select options and the tooltip here.
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
124.0.2478.80
SDK Version
1.0.2478.35
Framework
WPF
Operating System
Windows 11
OS Version
22631.3447
Repro steps
- Open a WPF application with WebView2 control embedded.
- Navigate to a webpage containing tooltips and select options.
- Take a screenshot or initiate a screenshare.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
N/A
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WPF application and embedded WebView2 reproduction described in the issue, using the SetWindowDisplayAffinity WinAPI documentation as context. Reproduce the screenshot or screenshare with an HTML title attribute and select options on Windows 11, then determine why those elements remain visible while the main window is excluded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100