1
0
Fork 0
forked from wry/wry

tree: add Node::node_make_visible

This commit is contained in:
Julian Orth 2025-07-18 20:01:27 +02:00
parent 289c201a69
commit 4bfa9fb7fc
15 changed files with 147 additions and 34 deletions

View file

@ -1636,6 +1636,10 @@ impl Node for ContainerNode {
Some(self)
}
fn node_make_visible(self: Rc<Self>) {
self.toplevel_data.make_visible(&*self);
}
fn node_on_button(
self: Rc<Self>,
seat: &Rc<WlSeatGlobal>,
@ -1919,6 +1923,28 @@ impl ContainingNode for ContainerNode {
self.workspace.get()
}
fn cnode_make_visible(self: Rc<Self>, child: &dyn Node) {
let Some(child) = self
.child_nodes
.borrow()
.get(&child.node_id())
.map(|n| n.to_ref())
else {
return;
};
self.toplevel_data.make_visible(&*self);
if !self.node_visible() {
return;
}
let Some(cur) = self.mono_child.get() else {
return;
};
if cur.node.node_id() == child.node.node_id() {
return;
}
self.activate_child(&child);
}
fn cnode_set_child_position(self: Rc<Self>, child: &dyn Node, x: i32, y: i32) {
let Some(parent) = self.toplevel_data.parent.get() else {
return;