From ff45b3b4b2fee6849bebcac0731d37457a594c3c Mon Sep 17 00:00:00 2001 From: Marlon Kranz Date: Wed, 21 Oct 2026 14:02:49 +0200 Subject: [PATCH] fix(notifications): close popups when their screen stops showing them (#3844) (cherry picked from commit b81954454a7c6a53ffa6d49d65906aa65694eef1) --- .../Notifications/Popup/NotificationPopupManager.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/quickshell/Modules/Notifications/Popup/NotificationPopupManager.qml b/quickshell/Modules/Notifications/Popup/NotificationPopupManager.qml index c63b98d76..c15026a8e 100644 --- a/quickshell/Modules/Notifications/Popup/NotificationPopupManager.qml +++ b/quickshell/Modules/Notifications/Popup/NotificationPopupManager.qml @@ -557,6 +557,13 @@ QtObject { } Component.onCompleted: _sync(NotificationService.visibleNotifications) + Component.onDestruction: { + for (const p of popupWindows) + p?.destroy(); + const screenName = manager.modelData?.name || ""; + if (screenName) + ConnectedModeState.releaseSurface(screenName, "notification", "notification:" + screenName); + } onPopupSpacingChanged: _repositionAll() onNotificationConnectedModeChanged: _scheduleNotificationChromeSync() onCloseGapNotificationsChanged: _scheduleNotificationChromeSync()