MessageTray: destroy notifications manually when the source is destroyed
Using a signal handlers causes us to depend on connection order, but we need the message tray code to run last, so it can notice that notifications are destroyed when hiding the boxpointer and skip the broken animation. https://bugzilla.gnome.org/show_bug.cgi?id=686855
This commit is contained in:
@ -404,11 +404,6 @@ const Notification = new Lang.Class({
|
||||
this._soundFile = null;
|
||||
this._soundPlayed = false;
|
||||
|
||||
source.connect('destroy', Lang.bind(this,
|
||||
function (source, reason) {
|
||||
this.destroy(reason);
|
||||
}));
|
||||
|
||||
this.actor = new St.Button({ accessible_role: Atk.Role.NOTIFICATION });
|
||||
this.actor.add_style_class_name('notification-unexpanded');
|
||||
this.actor._delegate = this;
|
||||
@ -1337,6 +1332,13 @@ const Source = new Lang.Class({
|
||||
|
||||
destroy: function(reason) {
|
||||
this.policy.destroy();
|
||||
|
||||
let notifications = this.notifications;
|
||||
this.notifications = [];
|
||||
|
||||
for (let i = 0; i < notifications.length; i++)
|
||||
notifications[i].destroy(reason);
|
||||
|
||||
this.emit('destroy', reason);
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user