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.
commit40891113c73a9af37a382b1648d1ce28dec455cc authorMirco Müller <mirco.mueller@ubuntu.com> dateMon 14 Jul 2014, 16:13 (12 years ago) parent194cb7c
1 file changed+8
qml/Notifications/Notification.qml+8
qml/Notifications/Notification.qml+8
@@ -148,9 +148,17 @@ Item {
148148 UnityMenuModel {
149149 id: unityMenuModel
150150
151+ property string lastNameOwner: ""
152+
151153 busName: paths.busName
152154 actions: paths.actions
153155 menuObjectPath: paths.menuObjectPath
156+ onNameOwnerChanged: {
157+ if (lastNameOwner != "" && nameOwner == "" && notification.notification != undefined) {
158+ notification.notification.close()
159+ }
160+ lastNameOwner = nameOwner
161+ }
154162 }
155163
156164 Behavior on implicitHeight {