Repository navigation
feat(privacy): exclude chosen applications from captures - #11
Merged
Merged
Conversation
Add a Privacy pane to Settings with a list of applications to keep out of captures, a name filter over the running applications, a master switch, and a switch for Glimpr's own windows. macOS removes the listed applications from screenshots and recordings through the display content filter, with a per-application scope (all, screenshots, recordings). Windows covers their visible areas in screenshots, black or blurred per application; recordings are not affected there. Excluded applications are not offered as window or element snap targets on the surfaces they are excluded from.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
There was no way to keep a particular application out of a screenshot or recording: a floating widget, or an application whose content should not be captured by accident.
Change
lib/capture/excluded_app.dart,lib/settings/excluded_apps.dart,lib/settings/settings.dart: the stored list (excluded_apps, entries joined by|with an optional?modesuffix), the master switch (excluded_apps_enabled) and the own-windows switch (exclude_own_windows).OverlayKit.swift,RecordingKit.swift,ElementSnap.swift,CaptureChannel.swift): one display-filter builder used by the screenshot paths, the recording and the record-select loupe. Listed applications are removed withexcludingApplications; where Glimpr windows must also be hidden (recording chrome, the own-windows switch), Glimpr joins the excluded applications and the windows it keeps come back as exceptions. Per-application scope: all, screenshots, recordings. Window snap, element snap and the focused-window lookup skip processes that are absent from the surface being captured. The cached shareable content is refetched once when a listed application started after it was taken.capture_mask.h,excluded_apps.{h,cpp},overlay_manager.cpp,capture_channel.cpp,window_enum.cpp,snap_filter.h,prefs_probe.h): the visible area of each listed application's windows (its bounds minus opaque windows in front) is covered in the captured frame, black or blurred per application, on both the SDR and the HDR buffer. Windows are sampled before and after the capture and each distinct area is covered once. Listed applications are not snap or focused-window targets for screenshots. The own-windows switch sets the capture-exclusion display affinity on the Settings, Image Editor and pin windows.Platform differences: macOS removes the windows and shows what is behind them, in screenshots and recordings. Windows covers them in screenshots only; recordings are not affected there. On Windows the own-windows switch removes those windows from every screen capture on the machine, and an Image Editor window that is already open picks the setting up the next time it opens.
Known limits: notifications and taskbar / Dock surfaces are drawn by the system and are not covered. Covered areas on Windows are rectangular. On macOS, with a non-empty list, a Glimpr window opened after a recording started does not appear in that recording.
Verification
flutter analyzeand the fullflutter testsuite pass on macOS and on Windows.flutter build macos --debugandflutter build windows --releasesucceed.