1
0
Fork 0
forked from wry/wry

autocommit 2022-04-08 23:02:38 CEST

This commit is contained in:
Julian Orth 2022-04-08 23:02:38 +02:00
parent 0bd9a70e69
commit 21e2216ce5
40 changed files with 587 additions and 255 deletions

View file

@ -4,7 +4,6 @@ use {
cursor::KnownCursor,
ifs::{
wl_seat::{NodeSeatState, WlSeatGlobal},
wl_surface::xwindow::Xwindow,
zwlr_layer_shell_v1::{OVERLAY, TOP},
},
tree::{walker::NodeVisitor, FindTreeResult, FoundNode, Node, NodeId, OutputNode},
@ -17,7 +16,6 @@ pub struct DisplayNode {
pub id: NodeId,
pub outputs: CopyHashMap<ConnectorId, Rc<OutputNode>>,
pub stacked: LinkedList<Rc<dyn Node>>,
pub xstacked: LinkedList<Rc<Xwindow>>,
pub seat_state: NodeSeatState,
}
@ -27,7 +25,6 @@ impl DisplayNode {
id,
outputs: Default::default(),
stacked: Default::default(),
xstacked: Default::default(),
seat_state: Default::default(),
}
}
@ -42,6 +39,10 @@ impl Node for DisplayNode {
&self.seat_state
}
fn visible(&self) -> bool {
true
}
fn destroy_node(&self, _detach: bool) {
let mut outputs = self.outputs.lock();
for output in outputs.values() {
@ -79,7 +80,9 @@ impl Node for DisplayNode {
x,
y,
});
if output.find_layer_surface_at(x, y, &[OVERLAY, TOP], tree) == FindTreeResult::AcceptsInput {
if output.find_layer_surface_at(x, y, &[OVERLAY, TOP], tree)
== FindTreeResult::AcceptsInput
{
return FindTreeResult::AcceptsInput;
}
tree.pop();