feat(app): secrets kept out of screenshots on macOS and Windows too

The reading of the full reading's fixes noted that macOS and Windows can
keep a window out of screen captures, which SecretScreen didn't ask.

PlatformScreenGuard now asks the app's window on Android, macOS and
Windows (asksOn), and both apps' runners answer app.halkyon/screen_guard,
counting what shows: macOS's MainFlutterWindow sets sharingType = .none,
Windows' FlutterWindow WDA_EXCLUDEFROMCAPTURE (Windows 10 2004 on;
before, WDA_MONITOR, black in captures). Neither runner was built here
(Linux): to be tried on each system.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-21 16:40:43 +02:00
commit b9bf9813c5
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -87,10 +87,13 @@ Written as the apps are: Dart 3.13's primary constructors, Material from
through Flutter, so clipboard histories and cloud clipboards would keep
it): the recovery phrase and codes are saved or written down, an
authenticator's key scanned, opened or typed; all of them show in a
`SecretScreen`, kept out of screenshots and recents on Android
(`FLAG_SECURE`: the app's `MainActivity` answers `app.halkyon/screen_guard`,
as Learn's and Todo's `ScreenGuard.kt` do) and covered on iOS while the app
isn't in front; keyboards learn nothing typed into a password, a code or
`SecretScreen` (the phrase typed back too), kept out of screenshots,
screen recordings and recents where the app's window answers
`app.halkyon/screen_guard`: Android's `FLAG_SECURE` (as Learn's and Todo's
`ScreenGuard.kt` in their `MainActivity`), macOS's `sharingType = .none`
(`MainFlutterWindow.swift`) and Windows' `WDA_EXCLUDEFROMCAPTURE`
(`flutter_window.cpp`); covered on iOS while the app isn't in front;
nothing on Linux; keyboards learn nothing typed into a password, a code or
the phrase; no state's text (which a debug build's bloc observer logs) holds
a secret, a code or the address; only an `otpauth:` URI is shown as a QR
code or opened; and anything a step didn't expect (bytes of the wrong