Patch release: Windows screenshot prevention now actually works.
Fixed
- fix(windows): screenshot prevention now applies
SetWindowDisplayAffinityto the top-level window instead of the child Flutter view (#119). Display affinity is a top-level-window property and the Flutter runner reparents the view viaSetParent, so previous versions silently protected nothing on Windows —screenshotOff()reported success while window content stayed fully capturable. The plugin now resolves the root ancestor on every call and re-asserts persisted prevention once the view is attached to its real top-level window, covering both the standard runner and multi-window embeddings (e.g.desktop_multi_window).
Notes
- With prevention active, the entire top-level window (title bar included) is hidden from capture, matching native behavior.
- The plugin now effectively owns the top-level window's display affinity on Windows — don't combine it with other plugins that set it (e.g.
window_manager's prevent-screen-capture). - Engines without a view (headless add-to-app) remain a no-op.
- On Windows 10 older than version 2004 (build 19041),
WDA_EXCLUDEFROMCAPTUREisn't available and the existingWDA_MONITORfallback applies (window blacked out in captures).
Full details: CHANGELOG
On pub.dev: https://pub.dev/packages/no_screenshot/versions/2.0.1