1
0
Fork 0
forked from wry/wry

tree: add Node::node_layer

This commit is contained in:
Julian Orth 2025-07-19 21:57:47 +02:00
parent a5e8b39e4f
commit dbc954dded
19 changed files with 294 additions and 46 deletions

View file

@ -28,7 +28,7 @@ use {
state::State,
tree::{
ContainerNode, ContainerSplit, ContainingNode, Direction, FloatNode, Node, NodeId,
OutputNode, PlaceholderNode, WorkspaceNode,
NodeLayerLink, OutputNode, PlaceholderNode, WorkspaceNode,
},
utils::{
array_to_tuple::ArrayToTuple,
@ -902,6 +902,16 @@ impl ToplevelData {
parent.cnode_make_visible(slf);
}
}
pub fn node_layer(&self) -> NodeLayerLink {
if self.self_or_ancestor_is_fullscreen.get() {
return NodeLayerLink::Fullscreen;
}
if let Some(float) = self.float.get() {
return float.node_layer();
}
NodeLayerLink::Tiled
}
}
impl Drop for ToplevelData {