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

+6 -3
View File
@@ -827,7 +827,8 @@ impl Ferese {
return;
};
let Some(window) = self
.window_ids
.windows
.ids()
.iter()
.find(|(_, candidate)| **candidate == id)
.map(|(window, _)| window.clone())
@@ -936,7 +937,8 @@ impl Ferese {
.and_then(|client| client.get_credentials(&self.display_handle).ok())
.is_some_and(|credentials| credentials.pid as u32 == pid)
};
self.window_ids
self.windows
.ids()
.keys()
.filter_map(|window| window.toplevel())
.any(|toplevel| belongs_to(toplevel.wl_surface()))
@@ -951,7 +953,8 @@ impl Ferese {
use smithay::wayland::compositor::with_states;
use smithay::wayland::shell::xdg::XdgToplevelSurfaceData;
let mut windows = self
.window_ids
.windows
.ids()
.iter()
.filter_map(|(window, id)| {
let toplevel = window.toplevel()?;