microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.75k stars 311 forks source link

GraphicsCaptureSession for specific window can't capture context menus #833

Open FrayxRulez opened 3 years ago

FrayxRulez commented 3 years ago

Describe the bug

GraphicsCaptureSession currently doesn't seem able to capture context menus when selecting a specific window (using GraphicsCapturePicker and not interop if this makes a difference) as capture source. Now, it's clear that this happens because context menus are windows on their own, but it would be cool if this issue could be addressed somehow (to say, by capturing also windows in the current window subtree).

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Pick a window using GraphicsCapturePicker.
  2. Record the opening of a context menu.
  3. Notice that the context menu wasn't captured.

Expected behavior Context menus are captured by GraphicsCaptureSession.

Version Info

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041) Yes
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)

Additional context

JaiganeshKumaran commented 3 years ago

It also doesn't capture tooltips in both video and image capture. It's also noticeable in many second-party/third-party screenshot utilities like OneDrive's print screen feature but it works fine in the built-in screenshot tool (Windows + Print screen).

MarcAnt01 commented 3 years ago

I develop a screen recording app and a lot of users are complaining about this behavior, since they expect those menus to be recorded and they usually blame the app itself.

sylveon commented 3 years ago

to say, by capturing also windows in the current window subtree

Capturing child windows does not resolve the issue here because UWP flyouts/tooltips and Win32 context menu/tooltips are not child windows, they are their own top-level windows.

FrayxRulez commented 3 years ago

Thanks @sylveon, I was pretty sure about UWP ones, but not really about Win32!