desktop: always aggregate the subsurface offset
when querying a surface tree for damage.
fixes wrong damage location for surface trees with
a depth greater than 1 when only the sub-subsurface
has been damaged by the client. otherwise the location
would not account for the parent subsurface offset.
@@ -113,18 +113,10 @@ where
location.into(),
|_surface, states, location| {
let mut location = *location;
- if let Some(data) = states.data_map.get::<RefCell<SurfaceState>>() {
- let data = data.borrow();
- if key
- .as_ref()
- .map(|key| data.space_seen.get(key).copied().unwrap_or(0) < data.commit_count)
- .unwrap_or(true)
- && states.role == Some("subsurface")
- {
+ if states.role == Some("subsurface") {
let current = states.cached_state.current::<SubsurfaceCachedState>();
location += current.location;
}
- }
TraversalAction::DoChildren(location)
},
|_surface, states, location| {
