autocommit 2022-04-18 14:14:25 CEST
This commit is contained in:
parent
085ca95835
commit
54cf01f745
20 changed files with 155 additions and 109 deletions
|
|
@ -13,6 +13,7 @@ use {
|
|||
linkedlist::{LinkedList, LinkedNode},
|
||||
},
|
||||
},
|
||||
jay_config::Direction,
|
||||
std::{cell::Cell, fmt::Debug, rc::Rc},
|
||||
};
|
||||
|
||||
|
|
@ -74,6 +75,10 @@ impl SizedNode for WorkspaceNode {
|
|||
self.visible.get()
|
||||
}
|
||||
|
||||
fn parent(&self) -> Option<Rc<dyn Node>> {
|
||||
Some(self.output.get())
|
||||
}
|
||||
|
||||
fn last_active_child(self: &Rc<Self>) -> Rc<dyn Node> {
|
||||
if let Some(c) = self.container.get() {
|
||||
return c.last_active_child();
|
||||
|
|
@ -89,6 +94,12 @@ impl SizedNode for WorkspaceNode {
|
|||
self.seat_state.set_visible(self, visible);
|
||||
}
|
||||
|
||||
fn do_focus(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction) {
|
||||
if let Some(container) = self.container.get() {
|
||||
container.do_focus(seat, direction);
|
||||
}
|
||||
}
|
||||
|
||||
fn absolute_position(&self) -> Rect {
|
||||
self.position.get()
|
||||
}
|
||||
|
|
@ -117,6 +128,10 @@ impl SizedNode for WorkspaceNode {
|
|||
renderer.render_workspace(self, x, y);
|
||||
}
|
||||
|
||||
fn into_workspace(self: &Rc<Self>) -> Option<Rc<WorkspaceNode>> {
|
||||
Some(self.clone())
|
||||
}
|
||||
|
||||
fn accepts_child(&self, node: &dyn Node) -> bool {
|
||||
node.node_is_container()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue