Skip to content

v2.0.1

Latest

Choose a tag to compare

@fonkamloic fonkamloic released this 08 Aug 20:05
· 7 commits to development since this release
1da88d7

Patch release: Windows screenshot prevention now actually works.

Fixed

  • fix(windows): screenshot prevention now applies SetWindowDisplayAffinity to 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 via SetParent, 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_EXCLUDEFROMCAPTURE isn't available and the existing WDA_MONITOR fallback applies (window blacked out in captures).

Full details: CHANGELOG
On pub.dev: https://pub.dev/packages/no_screenshot/versions/2.0.1