tree: make surface visibility tracking more robust
This commit is contained in:
parent
be0935c8dd
commit
ba98103233
26 changed files with 313 additions and 144 deletions
|
|
@ -5,6 +5,7 @@ use {
|
|||
ifs::wl_seat::{NodeSeatState, WlSeatGlobal},
|
||||
rect::Rect,
|
||||
renderer::Renderer,
|
||||
state::State,
|
||||
tree::{
|
||||
walker::NodeVisitor, FindTreeResult, FoundNode, Node, NodeId, OutputNode, StackedNode,
|
||||
},
|
||||
|
|
@ -60,6 +61,21 @@ impl DisplayNode {
|
|||
}
|
||||
self.extents.set(Rect::new(x1, y1, x2, y2).unwrap());
|
||||
}
|
||||
|
||||
pub fn update_visible(&self, state: &State) {
|
||||
let visible = state.root_visible();
|
||||
for output in self.outputs.lock().values() {
|
||||
output.update_visible();
|
||||
}
|
||||
for stacked in self.stacked.iter() {
|
||||
if !stacked.stacked_has_workspace_link() {
|
||||
stacked.stacked_set_visible(visible);
|
||||
}
|
||||
}
|
||||
for seat in state.globals.seats.lock().values() {
|
||||
seat.set_visible(visible);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Node for DisplayNode {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue