1
0
Fork 0
forked from wry/wry

wayland: implement surface transformations

- buffer scale
- buffer transform
- viewporter
This commit is contained in:
Julian Orth 2022-05-28 18:18:29 +02:00
parent 20f0fba553
commit 95327685c1
16 changed files with 635 additions and 75 deletions

View file

@ -343,15 +343,14 @@ impl Node for Xwindow {
}
fn node_find_tree_at(&self, x: i32, y: i32, tree: &mut Vec<FoundNode>) -> FindTreeResult {
if let Some(buffer) = self.surface.buffer.get() {
if x < buffer.rect.width() && y < buffer.rect.height() {
tree.push(FoundNode {
node: self.surface.clone(),
x,
y,
});
return FindTreeResult::AcceptsInput;
}
let rect = self.surface.buffer_abs_pos.get();
if x < rect.width() && y < rect.height() {
tree.push(FoundNode {
node: self.surface.clone(),
x,
y,
});
return FindTreeResult::AcceptsInput;
}
FindTreeResult::Other
}