tree: add Node::node_location
This commit is contained in:
parent
f75051281b
commit
289c201a69
20 changed files with 152 additions and 45 deletions
|
|
@ -19,8 +19,8 @@ use {
|
|||
rect::Rect,
|
||||
renderer::Renderer,
|
||||
tree::{
|
||||
FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeVisitor, OutputNode,
|
||||
StackedNode,
|
||||
FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeLocation, NodeVisitor,
|
||||
OutputNode, StackedNode,
|
||||
},
|
||||
utils::clonecell::CloneCell,
|
||||
wire::{XdgPopupId, xdg_popup::*},
|
||||
|
|
@ -319,6 +319,10 @@ impl Node for XdgPopup {
|
|||
self.xdg.workspace.get().map(|w| w.output.get())
|
||||
}
|
||||
|
||||
fn node_location(&self) -> Option<NodeLocation> {
|
||||
self.xdg.surface.node_location()
|
||||
}
|
||||
|
||||
fn node_find_tree_at(
|
||||
&self,
|
||||
x: i32,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use {
|
|||
state::State,
|
||||
tree::{
|
||||
ContainerSplit, Direction, FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId,
|
||||
NodeVisitor, OutputNode, TileDragDestination, ToplevelData, ToplevelNode,
|
||||
NodeLocation, NodeVisitor, OutputNode, TileDragDestination, ToplevelData, ToplevelNode,
|
||||
ToplevelNodeBase, ToplevelNodeId, ToplevelType, WorkspaceNode,
|
||||
default_tile_drag_destination,
|
||||
},
|
||||
|
|
@ -512,7 +512,7 @@ impl XdgToplevel {
|
|||
self.extents_changed();
|
||||
if let Some(workspace) = self.xdg.workspace.get() {
|
||||
let output = workspace.output.get();
|
||||
surface.set_output(&output);
|
||||
surface.set_output(&output, workspace.location());
|
||||
}
|
||||
// {
|
||||
// let seats = surface.client.state.globals.lock_seats();
|
||||
|
|
@ -573,6 +573,10 @@ impl Node for XdgToplevel {
|
|||
self.toplevel_data.output_opt()
|
||||
}
|
||||
|
||||
fn node_location(&self) -> Option<NodeLocation> {
|
||||
self.xdg.surface.node_location()
|
||||
}
|
||||
|
||||
fn node_do_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, _direction: Direction) {
|
||||
seat.focus_toplevel(self.clone());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue