1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use crate::config::Config;
use crate::display_servers::DisplayServer;
use crate::models::Manager;
impl<C: Config, SERVER: DisplayServer> Manager<C, SERVER> {
pub fn update_windows(&mut self) {
self.state
.windows
.iter_mut()
.for_each(|w| w.set_visible(w.tag.is_none()));
for ws in &self.state.workspaces {
let windows = &mut self.state.windows;
let all_tags = &self.state.tags;
if let Some(Some(tag)) = ws.tag.map(|tag_id| all_tags.get(tag_id)) {
tag.update_windows(windows, ws);
}
}
}
}