diff --git a/src/ifs/wl_surface.rs b/src/ifs/wl_surface.rs index bde99176..99c6c27b 100644 --- a/src/ifs/wl_surface.rs +++ b/src/ifs/wl_surface.rs @@ -1594,7 +1594,7 @@ impl WlSurface { let ext = child.sub_surface.surface.extents.get(); let ext = ext.move_(pos.0, pos.1); if ext.contains(x, y) { - let (x, y) = ext.translate(x, y); + let (x, y) = (x - pos.0, y - pos.1); if let Some(res) = child.sub_surface.surface.find_surface_at(x, y) { return Some(res); } diff --git a/src/ifs/wl_surface/wl_subsurface.rs b/src/ifs/wl_surface/wl_subsurface.rs index 71f0cd08..0a2fef38 100644 --- a/src/ifs/wl_surface/wl_subsurface.rs +++ b/src/ifs/wl_surface/wl_subsurface.rs @@ -433,7 +433,7 @@ impl SurfaceExt for WlSubsurface { } fn tray_item(self: Rc) -> Option { - self.surface.node_tray_item() + self.parent.node_tray_item() } }