fix: filter by active workspace in overlap notify

This commit is contained in:
Ashley Wulber 2024-12-05 12:13:31 -05:00 • committed by Victoria Brekenfeld
parent fc84fa9948
commit 76863aaf9b
3 changed files with 45 additions and 4 deletions

View file

@ -37,6 +37,19 @@ impl OverlapNotifyHandler for State {
let shell = self.common.shell.read().unwrap();
shell.outputs().cloned().collect::<Vec<_>>().into_iter()
}
fn active_workspaces(
&self,
) -> impl Iterator<Item = crate::wayland::protocols::workspace::WorkspaceHandle> {
let shell = self.common.shell.read().unwrap();
shell
.workspaces
.sets
.iter()
.map(|(_, set)| set.workspaces[set.active].handle)
.collect::<Vec<_>>()
.into_iter()
}
}
delegate_overlap_notify!(State);