shell: Fix surface_under for sticky windows as well
This commit is contained in:
parent
62e82837f7
commit
b371a26362
1 changed files with 2 additions and 21 deletions
|
|
@ -2082,27 +2082,8 @@ impl Shell {
|
||||||
let overview = self.overview_mode.clone();
|
let overview = self.overview_mode.clone();
|
||||||
self.workspaces.sets.get_mut(output).and_then(|set| {
|
self.workspaces.sets.get_mut(output).and_then(|set| {
|
||||||
set.sticky_layer
|
set.sticky_layer
|
||||||
.space
|
.surface_under(location.to_local(output))
|
||||||
.element_under(location.to_local(output).as_logical())
|
.map(|(target, offset)| (target, offset.to_global(output)))
|
||||||
.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),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.or_else(|| set.workspaces[set.active].surface_under(location, overview))
|
.or_else(|| set.workspaces[set.active].surface_under(location, overview))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue