1
0
Fork 0
forked from wry/wry

autocommit 2022-04-20 17:28:17 CEST

This commit is contained in:
Julian Orth 2022-04-20 17:28:17 +02:00
parent ab3c2e44f4
commit 1227ede560
9 changed files with 137 additions and 25 deletions

View file

@ -120,8 +120,20 @@ impl SizedNode for WorkspaceNode {
FindTreeResult::AcceptsInput
}
fn remove_child2(self: &Rc<Self>, _child: &dyn Node, _preserve_focus: bool) {
self.container.set(None);
fn remove_child2(self: &Rc<Self>, child: &dyn Node, _preserve_focus: bool) {
if let Some(container) = self.container.get() {
if container.node_id() == child.node_id() {
self.container.set(None);
return;
}
}
if let Some(fs) = self.fullscreen.get() {
if fs.as_node().node_id() == child.node_id() {
self.fullscreen.set(None);
return;
}
}
log::error!("Trying to remove child that's not a child");
}
fn pointer_focus(&self, seat: &Rc<WlSeatGlobal>) {