seat: add framework to select toplevels
This commit is contained in:
parent
e4e090d3a2
commit
17a0dfed5e
31 changed files with 603 additions and 131 deletions
|
|
@ -13,8 +13,8 @@ use {
|
|||
text::TextTexture,
|
||||
tree::{
|
||||
container::ContainerNode, walker::NodeVisitor, ContainingNode, Direction,
|
||||
FindTreeResult, FoundNode, Node, NodeId, NodeVisitorBase, OutputNode, StackedNode,
|
||||
ToplevelNode,
|
||||
FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeVisitorBase, OutputNode,
|
||||
StackedNode, ToplevelNode,
|
||||
},
|
||||
utils::{
|
||||
clonecell::CloneCell,
|
||||
|
|
@ -224,14 +224,20 @@ impl Node for WorkspaceNode {
|
|||
}
|
||||
}
|
||||
|
||||
fn node_find_tree_at(&self, x: i32, y: i32, tree: &mut Vec<FoundNode>) -> FindTreeResult {
|
||||
fn node_find_tree_at(
|
||||
&self,
|
||||
x: i32,
|
||||
y: i32,
|
||||
tree: &mut Vec<FoundNode>,
|
||||
usecase: FindTreeUsecase,
|
||||
) -> FindTreeResult {
|
||||
if let Some(n) = self.container.get() {
|
||||
tree.push(FoundNode {
|
||||
node: n.clone(),
|
||||
x,
|
||||
y,
|
||||
});
|
||||
n.node_find_tree_at(x, y, tree);
|
||||
n.node_find_tree_at(x, y, tree, usecase);
|
||||
}
|
||||
FindTreeResult::AcceptsInput
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue