floating: Don't drop stack on themselves

This commit is contained in:
Victoria Brekenfeld 2024-03-28 17:25:09 +01:00
parent 6416299d58
commit 10940a723f

View file

@ -670,6 +670,14 @@ impl FloatingLayout {
window: CosmicMapped,
position: Point<i32, Local>,
) -> (CosmicMapped, Point<i32, Local>) {
if self
.hovered_stack
.as_ref()
.is_some_and(|(stack, _)| stack == &window || !stack.alive())
{
let _ = self.hovered_stack.take();
}
if let Some((mapped, geo)) = self.hovered_stack.take() {
let stack = mapped.stack_ref().unwrap();
for surface in window.windows().map(|s| s.0) {