autocommit 2022-04-20 14:58:34 CEST
This commit is contained in:
parent
c1773c0fee
commit
fa1ec0b36c
22 changed files with 583 additions and 185 deletions
|
|
@ -16,6 +16,7 @@ use {
|
|||
jay_config::Direction,
|
||||
std::{cell::Cell, fmt::Debug, rc::Rc},
|
||||
};
|
||||
use crate::tree::FullscreenNode;
|
||||
|
||||
tree_id!(WorkspaceNodeId);
|
||||
|
||||
|
|
@ -29,6 +30,7 @@ pub struct WorkspaceNode {
|
|||
pub name: String,
|
||||
pub output_link: Cell<Option<LinkedNode<Rc<WorkspaceNode>>>>,
|
||||
pub visible: Cell<bool>,
|
||||
pub fullscreen: CloneCell<Option<Rc<dyn FullscreenNode>>>,
|
||||
}
|
||||
|
||||
impl WorkspaceNode {
|
||||
|
|
@ -69,6 +71,9 @@ impl SizedNode for WorkspaceNode {
|
|||
if let Some(c) = self.container.get() {
|
||||
visitor.visit_container(&c);
|
||||
}
|
||||
if let Some(fs) = self.fullscreen.get() {
|
||||
fs.into_node().node_visit(visitor);
|
||||
}
|
||||
}
|
||||
|
||||
fn visible(&self) -> bool {
|
||||
|
|
@ -116,7 +121,7 @@ impl SizedNode for WorkspaceNode {
|
|||
FindTreeResult::AcceptsInput
|
||||
}
|
||||
|
||||
fn remove_child(self: &Rc<Self>, _child: &dyn Node) {
|
||||
fn remove_child2(self: &Rc<Self>, _child: &dyn Node, _preserve_focus: bool) {
|
||||
self.container.set(None);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue