From 6081a48cd38245f99c1c6c7b531532ebd826e16b Mon Sep 17 00:00:00 2001 From: Hojjat Date: Tue, 8 Sep 2026 14:31:41 -0600 Subject: [PATCH] fix(app): count a popup closed once now that Done also reaches its parent --- src/app/cosmic.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/cosmic.rs b/src/app/cosmic.rs index c070f3e4..62a70342 100644 --- a/src/app/cosmic.rs +++ b/src/app/cosmic.rs @@ -563,9 +563,13 @@ where #[cfg(wayland_platform)] iced::Event::PlatformSpecific(iced::event::PlatformSpecific::Wayland(event)) => { match event { - wayland::Event::Popup(wayland::PopupEvent::Done, _, id) - | wayland::Event::Layer(wayland::LayerEvent::Done, _, id) => { - return Some(Action::SurfaceClosed(id)); + wayland::Event::Popup(wayland::PopupEvent::Done, _, popup) => { + if popup == id { + return Some(Action::SurfaceClosed(popup)); + } + } + wayland::Event::Layer(wayland::LayerEvent::Done, _, layer) => { + return Some(Action::SurfaceClosed(layer)); } #[cfg(feature = "applet")] wayland::Event::Window(