From b371a2636210385138b83ce2ba2eae3de7816253 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Thu, 28 Mar 2024 13:10:10 +0100 Subject: [PATCH] shell: Fix surface_under for sticky windows as well --- src/shell/mod.rs | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/shell/mod.rs b/src/shell/mod.rs index eba337c6..a5971ee2 100644 --- a/src/shell/mod.rs +++ b/src/shell/mod.rs @@ -2082,27 +2082,8 @@ impl Shell { let overview = self.overview_mode.clone(); self.workspaces.sets.get_mut(output).and_then(|set| { set.sticky_layer - .space - .element_under(location.to_local(output).as_logical()) - .and_then(|(mapped, element_offset)| { - let geometry = set - .sticky_layer - .space - .element_geometry(mapped) - .unwrap() - .as_local(); - let point = location.to_local(output) - geometry.loc.to_f64(); - mapped - .focus_under(point.as_logical()) - .map(|(surface, surface_offset)| { - ( - surface, - (element_offset + surface_offset) - .as_local() - .to_global(output), - ) - }) - }) + .surface_under(location.to_local(output)) + .map(|(target, offset)| (target, offset.to_global(output))) .or_else(|| set.workspaces[set.active].surface_under(location, overview)) }) }