wails/v3/examples/window
Lea Anthony 3f11d4e3fa
feat: Add Content Protection for Windows and macOS (#4485)
* feat: Add Content Protection for Windows and macOS

- Prevents window contents from being captured by screen recording/sharing software
- Windows: Uses WDA_EXCLUDEFROMCAPTURE on Windows 10 2004+, falls back to WDA_MONITOR
- macOS: Uses NSWindowSharingType to set window as read-only for screen sharing
- Added ContentProtectionEnabled option to WebviewWindowOptions
- Added SetContentProtection() method for runtime control
- Added comprehensive documentation and example usage

* fix changelog.mdx

* Misc fixes

* Misc fixes

* Update v3/pkg/w32/user32.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Remove debug line

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-09 17:12:39 +10:00
..
assets [v3-Windows] New DIP system for Enhanced High DPI Monitor Support (#3665) 2024-09-22 08:38:30 +10:00
main.go feat: Add Content Protection for Windows and macOS (#4485) 2025-08-09 17:12:39 +10:00
README.md Mac examples + readme updated 2023-10-17 20:25:36 +11:00
windows.go Fix non-windows build issues 2024-06-09 08:28:38 +10:00

Window Example

This example is a demonstration of the Windows API.

Running the example

To run the example, simply run the following command:

go run .

Status

Platform Status
Mac
Windows Working
Linux