From 10940a723fa43392d9f1fcedb7486e639e13efa0 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Thu, 28 Mar 2024 17:25:09 +0100 Subject: [PATCH] floating: Don't drop stack on themselves --- src/shell/layout/floating/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/shell/layout/floating/mod.rs b/src/shell/layout/floating/mod.rs index 93cb7509..e3921999 100644 --- a/src/shell/layout/floating/mod.rs +++ b/src/shell/layout/floating/mod.rs @@ -670,6 +670,14 @@ impl FloatingLayout { window: CosmicMapped, position: Point, ) -> (CosmicMapped, Point) { + 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) {