Refactor window ownership and immutable frame sampling

This commit is contained in:
Samuel Onoja committed 2026-10-01 18:03:01 +01:00
1 parent c0010ccbb6
commit 07bda5a21c
31 files changed
+1222 -623

No files matched your search

+3 -2
View File
@@ -186,7 +186,8 @@ impl Ferese {
return None;
}
let window = self
.window_ids
.windows
.ids()
.iter()
.find(|(_, candidate)| **candidate == id)?
.0
@@ -283,7 +284,7 @@ pub(super) fn copy_snapshot(state: &Ferese, resource: &ZwlrScreencopyFrameV1, da
};
if state.session_lock.active
|| !super::screencopy::capture_allowed()
|| !state.window_ids.values().any(|id| *id == snapshot.id)
|| !state.windows.ids().values().any(|id| *id == snapshot.id)
{
resource.failed();
return;