Skip to content

Add Window::SetContentProtection (exclude from screen capture) #71

Description

@lijy91

Add Window::SetContentProtection(bool) so the window's content is excluded from screenshots and screen recording, like Electron's win.setContentProtection():

  • Windows: SetWindowDisplayAffinity(hwnd, WDA_EXCLUDEFROMCAPTURE) (Windows 10 2004+, else WDA_MONITOR)
  • macOS: NSWindow.sharingType = NSWindowSharingNone (note: not honoured by ScreenCaptureKit on recent macOS)
  • Linux: not available; document it

Background:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions