Skip to content

Commit

Permalink
wl_surface: fix sub-surface extents filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mahkoh committed Dec 7, 2024
1 parent e2f3164 commit 6998e73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ifs/wl_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1516,8 +1516,10 @@ impl WlSurface {
continue;
}
let pos = child.sub_surface.position.get();
if pos.contains(x, y) {
let (x, y) = pos.translate(x, y);
let ext = child.sub_surface.surface.extents.get();
let ext = ext.move_(pos.x1(), pos.y1());
if ext.contains(x, y) {
let (x, y) = ext.translate(x, y);
if let Some(res) = child.sub_surface.surface.find_surface_at(x, y) {
return Some(res);
}
Expand Down

0 comments on commit 6998e73

Please sign in to comment.