docs: improve win.setContentProtection() docs (#46596)

* docs: improve win.setContentProtection() docs

* docs: update Windows display affinity value

* docs: update Windows behavior description

* Revert "docs: update Windows behavior description"

This reverts commit 6d1942c53a4951b985643432d64cf79df26b2d34.

* Revert "docs: update Windows display affinity value"

This reverts commit c15363e75d271100a437387e4512f084cb8d3cf9.

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
This commit is contained in:
Milan Burda 2025-07-16 00:16:56 +02:00 committed by GitHub
commit 21b325b034
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1533,8 +1533,8 @@ events.
Prevents the window contents from being captured by other apps. Prevents the window contents from being captured by other apps.
On macOS it sets the NSWindow's sharingType to NSWindowSharingNone. On macOS it sets the NSWindow's [`sharingType`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.property?language=objc) to [`NSWindowSharingNone`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.enum/none?language=objc).
On Windows it calls SetWindowDisplayAffinity with `WDA_EXCLUDEFROMCAPTURE`. On Windows it calls [`SetWindowDisplayAffinity`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity) with `WDA_EXCLUDEFROMCAPTURE`.
For Windows 10 version 2004 and up the window will be removed from capture entirely, For Windows 10 version 2004 and up the window will be removed from capture entirely,
older Windows versions behave as if `WDA_MONITOR` is applied capturing a black window. older Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.