Protect selected windows from screen capture

Add capture privacy rules for windows, transient children, overview previews and client cursors, with separate capture rendering and deferred-frame invalidation. Keep detached close snapshots out of captures after clients leave the registry.

Validated with release workspace tests, private compositor/EGL regressions, and an isolated release PipeWire capture test.
This commit is contained in:
Samuel Onoja authored and GitHub committed 2026-10-03 10:49:01 +01:00
1 parent bffd538dd4
commit 453ec16583
24 files changed
+1132 -41

No files matched your search

+10
View File
@@ -1,4 +1,5 @@
mod animation;
mod capture_privacy;
mod floating;
mod focus;
mod hit_testing;
@@ -409,6 +410,10 @@ pub struct Ferese {
output_identity_ids: HashMap<String, OutputId>,
pub(crate) windows: WindowRegistry<Window>,
pub(crate) render: crate::render::RenderResources,
pub(crate) capture_render: crate::render::RenderResources,
pub(crate) capture_epoch: u64,
capture_protected_windows: HashSet<WindowId>,
capture_protected_cursor: Option<WlSurface>,
pub(crate) daemons: Option<std::rc::Rc<std::cell::RefCell<crate::daemon::Runner>>>,
pub(crate) display_presentation: crate::display_presentation::DisplayPresentation,
pub(crate) nested_backend: Option<NestedBackend>,
@@ -642,6 +647,10 @@ impl Ferese {
output_identity_ids: HashMap::new(),
windows: WindowRegistry::default(),
render: Default::default(),
capture_render: Default::default(),
capture_epoch: 0,
capture_protected_windows: HashSet::new(),
capture_protected_cursor: None,
display_presentation: Default::default(),
daemons: None,
nested_backend: None,
@@ -872,6 +881,7 @@ impl Ferese {
}
if old_rules != self.window_rules {
self.refresh_capture_privacy();
self.reapply_window_rules(&old_rules);
}