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

@ -12,8 +12,8 @@ use {
state::State,
tree::{
ContainerSplit, Direction, FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId,
NodeLocation, NodeVisitor, OutputNode, StackedNode, TileDragDestination, ToplevelData,
ToplevelNode, ToplevelNodeBase, ToplevelType, WorkspaceNode,
NodeLayerLink, NodeLocation, NodeVisitor, OutputNode, StackedNode, TileDragDestination,
ToplevelData, ToplevelNode, ToplevelNodeBase, ToplevelType, WorkspaceNode,
default_tile_drag_destination,
},
utils::{clonecell::CloneCell, copyhashmap::CopyHashMap, linkedlist::LinkedNode},
@ -375,6 +375,13 @@ impl Node for Xwindow {
self.x.surface.node_location()
}
fn node_layer(&self) -> NodeLayerLink {
if let Some(link) = self.display_link.borrow().as_ref() {
return NodeLayerLink::Stacked(link.to_ref());
}
self.toplevel_data.node_layer()
}
fn node_do_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, _direction: Direction) {
seat.focus_toplevel(self.clone());
}