From 6b833f1ca2bda69ed2c4984699f4e3ecdf2a5d4e Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Fri, 17 Feb 2017 10:34:42 +0100 Subject: [PATCH] [Notifications] Never manually hide() the NotificationPopup Otherwise the positioner will get completely confused. When a notification is closed, the popup will already be closed in response to sourceRemoved. Also, when triggering an action, call closePopup instead of hiding the popup. (cherry picked from commit b97fdfa293dd4de59046c19f08aa6a3b940a790c) Differential Revision: https://phabricator.kde.org/D4632 --- .../package/contents/ui/NotificationPopup.qml | 7 +++---- .../notifications/package/contents/ui/Notifications.qml | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/applets/notifications/package/contents/ui/NotificationPopup.qml b/applets/notifications/package/contents/ui/NotificationPopup.qml index 8690d1034..c408ef74a 100644 --- a/applets/notifications/package/contents/ui/NotificationPopup.qml +++ b/applets/notifications/package/contents/ui/NotificationPopup.qml @@ -85,7 +85,7 @@ PlasmaCore.Dialog { } closeNotification(notificationProperties.source) - notificationPopup.hide() + // the popup will be closed in response to sourceRemoved } onContainsMouseChanged: { if (containsMouse) { @@ -122,16 +122,15 @@ PlasmaCore.Dialog { onClose: { closeNotification(notificationProperties.source) - notificationPopup.hide() + // the popup will be closed in response to sourceRemoved } onConfigure: { configureNotification(notificationProperties.appRealName, notificationProperties.eventId) - notificationPopup.hide() + notificationPositioner.closePopup(notificationProperties.source); } onAction: { executeAction(notificationProperties.source, actionId) actions.clear() - notificationPopup.hide() } } } diff --git a/applets/notifications/package/contents/ui/Notifications.qml b/applets/notifications/package/contents/ui/Notifications.qml index 6826938cc..d0f253408 100644 --- a/applets/notifications/package/contents/ui/Notifications.qml +++ b/applets/notifications/package/contents/ui/Notifications.qml @@ -89,8 +89,9 @@ Column { //try to open the id as url } else if (id.indexOf("jobUrl#") !== -1) { Qt.openUrlExternally(id.slice(7)); - notificationPositioner.closePopup(source); } + + notificationPositioner.closePopup(source); } function configureNotification(appRealName, eventId) {