Add workspaces_for_output helper function
This commit is contained in:
parent
88b35e3027
commit
ba52d69421
2 changed files with 13 additions and 6 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -167,6 +167,16 @@ impl App {
|
|||
self.workspaces.iter_mut().find(|i| &i.handle == handle)
|
||||
}
|
||||
|
||||
// TODO iterate in order based on `coordinates`
|
||||
fn workspaces_for_output<'a>(
|
||||
&'a self,
|
||||
output: &'a wl_output::WlOutput,
|
||||
) -> impl Iterator<Item = &Workspace> + 'a {
|
||||
self.workspaces
|
||||
.iter()
|
||||
.filter(|w| w.outputs.contains(output))
|
||||
}
|
||||
|
||||
fn toplevel_for_handle_mut(
|
||||
&mut self,
|
||||
handle: &ZcosmicToplevelHandleV1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue