summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2017-02-17 09:34:42 (GMT)
committerKai Uwe Broulik <kde@privat.broulik.de>2017-02-17 09:34:42 (GMT)
commit6b833f1ca2bda69ed2c4984699f4e3ecdf2a5d4e (patch)
tree51c43d1e4418e593b71ff9a48b3ac2e7c77105e0
parent62b803b45dbe14dc24f7593c1c2907d1e4db3d74 (diff)
[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
-rw-r--r--applets/notifications/package/contents/ui/NotificationPopup.qml7
-rw-r--r--applets/notifications/package/contents/ui/Notifications.qml3
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 8690d10..c408ef7 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 6826938..d0f2534 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) {