1
0
Fork 0
forked from wry/wry

screencast: schedule toplevel screencasts with other screencasts

This commit is contained in:
Julian Orth 2024-09-01 10:55:29 +02:00
parent dbb9bd2299
commit b28ea64509
8 changed files with 90 additions and 15 deletions

View file

@ -7,7 +7,9 @@ use {
jay_workspace::JayWorkspace,
wl_output::OutputId,
wl_seat::{tablet::TabletTool, NodeSeatState, WlSeatGlobal},
wl_surface::WlSurface,
wl_surface::{
x_surface::xwindow::Xwindow, xdg_surface::xdg_toplevel::XdgToplevel, WlSurface,
},
},
rect::Rect,
renderer::Renderer,
@ -16,7 +18,7 @@ use {
tree::{
container::ContainerNode, walker::NodeVisitor, ContainingNode, Direction,
FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeVisitorBase, OutputNode,
StackedNode, ToplevelNode,
PlaceholderNode, StackedNode, ToplevelNode,
},
utils::{
clonecell::CloneCell,
@ -102,6 +104,26 @@ impl WorkspaceNode {
fn visit_surface(&mut self, node: &Rc<WlSurface>) {
node.set_output(self.0);
}
fn visit_container(&mut self, node: &Rc<ContainerNode>) {
node.tl_workspace_output_changed();
node.node_visit_children(self);
}
fn visit_toplevel(&mut self, node: &Rc<XdgToplevel>) {
node.tl_workspace_output_changed();
node.node_visit_children(self);
}
fn visit_xwindow(&mut self, node: &Rc<Xwindow>) {
node.tl_workspace_output_changed();
node.node_visit_children(self);
}
fn visit_placeholder(&mut self, node: &Rc<PlaceholderNode>) {
node.tl_workspace_output_changed();
node.node_visit_children(self);
}
}
let mut visitor = OutputSetter(output);
self.node_visit_children(&mut visitor);