toplevel: store containing float
This commit is contained in:
parent
a333198658
commit
a97e92ccea
4 changed files with 51 additions and 8 deletions
|
|
@ -17,10 +17,10 @@ use {
|
|||
state::State,
|
||||
text::TextTexture,
|
||||
tree::{
|
||||
ContainingNode, Direction, FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId,
|
||||
OutputNode, TddType, TileDragDestination, ToplevelData, ToplevelNode, ToplevelNodeBase,
|
||||
ToplevelType, WorkspaceNode, default_tile_drag_bounds, toplevel_set_floating,
|
||||
walker::NodeVisitor,
|
||||
ContainingNode, Direction, FindTreeResult, FindTreeUsecase, FloatNode, FoundNode, Node,
|
||||
NodeId, OutputNode, TddType, TileDragDestination, ToplevelData, ToplevelNode,
|
||||
ToplevelNodeBase, ToplevelType, WorkspaceNode, default_tile_drag_bounds,
|
||||
toplevel_set_floating, walker::NodeVisitor,
|
||||
},
|
||||
utils::{
|
||||
asyncevent::AsyncEvent,
|
||||
|
|
@ -2063,6 +2063,10 @@ impl ContainingNode for ContainerNode {
|
|||
fn cnode_set_pinned(self: Rc<Self>, pinned: bool) {
|
||||
self.tl_set_pinned(false, pinned);
|
||||
}
|
||||
|
||||
fn cnode_get_float(self: Rc<Self>) -> Option<Rc<FloatNode>> {
|
||||
self.tl_data().float.get()
|
||||
}
|
||||
}
|
||||
|
||||
impl ToplevelNodeBase for ContainerNode {
|
||||
|
|
@ -2176,6 +2180,12 @@ impl ToplevelNodeBase for ContainerNode {
|
|||
};
|
||||
child.node.tl_tile_drag_bounds(split, start) / 2
|
||||
}
|
||||
|
||||
fn tl_push_float(&self, float: Option<&Rc<FloatNode>>) {
|
||||
for child in self.children.iter() {
|
||||
child.node.tl_set_float(float);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn direction_to_split(dir: Direction) -> (ContainerSplit, bool) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue