From 4545719e18239edfb276c3ede7a76ca401fddc1e Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 28 Jan 2013 12:09:17 +0100 Subject: [PATCH] MessageTray: disconnect signal to notification early Similar to the previous patch, this adds robustness and prevents more stacktraces and confusion in the state machine. https://bugzilla.gnome.org/show_bug.cgi?id=692693 --- js/ui/messageTray.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 277b7e30b..79a91df3c 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -2384,11 +2384,18 @@ const MessageTray = new Lang.Class({ this.idleMonitor.disconnect(this._idleMonitorBecameActiveId); this._idleMonitorBecameActiveId = 0; } - if (this._notificationExpandedId) { this._notification.disconnect(this._notificationExpandedId); this._notificationExpandedId = 0; } + if (this._notificationClickedId) { + this._notification.disconnect(this._notificationClickedId); + this._notificationClickedId = 0; + } + if (this._notificationUnfocusedId) { + this._notification.disconnect(this._notificationUnfocusedId); + this._notificationUnfocusedId = 0; + } if (this._notificationRemoved) { Tweener.removeTweens(this._notificationWidget); @@ -2411,10 +2418,7 @@ const MessageTray = new Lang.Class({ _hideNotificationCompleted: function() { this._notification.collapseCompleted(); - this._notification.disconnect(this._notificationClickedId); - this._notificationClickedId = 0; - this._notification.disconnect(this._notificationUnfocusedId); - this._notificationUnfocusedId = 0; + let notification = this._notification; this._notification = null; if (notification.isTransient)