on xenial help sign in
Make use of nameOwnerChanged signal (qmenumodel) and close invokable (unity-notifications) to fix blocking of shell, if a passed UnityMenuModel gets pulled from DBus before a notification was closed.
4089111Mirco Müller
qml/Notifications/Notification.qml+8
@@ -148,9 +148,17 @@ Item {
148 UnityMenuModel {
148 UnityMenuModel {
149 id: unityMenuModel
149 id: unityMenuModel
150
150
151+ property string lastNameOwner: ""
152+
151 busName: paths.busName
153 busName: paths.busName
152 actions: paths.actions
154 actions: paths.actions
153 menuObjectPath: paths.menuObjectPath
155 menuObjectPath: paths.menuObjectPath
156+ onNameOwnerChanged: {
157+ if (lastNameOwner != "" && nameOwner == "" && notification.notification != undefined) {
158+ notification.notification.close()
159+ }
160+ lastNameOwner = nameOwner
161+ }
154 }
162 }
155
163
156 Behavior on implicitHeight {
164 Behavior on implicitHeight {