[gnome-shell] Disconnect content-updated signal early
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Disconnect content-updated signal early
- Date: Mon, 28 Jan 2013 20:03:17 +0000 (UTC)
commit cc60afa31a401e4b60f0f58fa945f8ca40a226d0
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Jan 28 12:01:36 2013 +0100
Disconnect content-updated signal early
During the box pointer animation, other events can trigger an updateState,
losing the information that the summary is hiding and thus never disconnecting
the signals. Then, this stale connections can cause stacktraces, as they
fire when summaryBoxPointerItem is null.
https://bugzilla.gnome.org/show_bug.cgi?id=692693
js/ui/messageTray.js | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 861f325..277b7e3 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2613,6 +2613,20 @@ const MessageTray = new Lang.Class({
_onSummaryBoxPointerUngrabbed: function() {
this._summaryBoxPointerState = State.HIDING;
+
+ if (this._summaryBoxPointerContentUpdatedId) {
+ this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId);
+ this._summaryBoxPointerContentUpdatedId = 0;
+ }
+ if (this._summaryBoxPointerCloseClickedId != 0) {
+ this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId);
+ this._summaryBoxPointerCloseClickedId = 0;
+ }
+ if (this._sourceDoneDisplayingId) {
+ this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId);
+ this._sourceDoneDisplayingId = 0;
+ }
+
this._unlock();
if (this._summaryBoxPointerItem.source.notifications.length == 0) {
@@ -2635,14 +2649,6 @@ const MessageTray = new Lang.Class({
this._summaryBoxPointerState = State.HIDDEN;
this._summaryBoxPointer.bin.child = null;
- this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId);
- this._summaryBoxPointerContentUpdatedId = 0;
- if (this._summaryBoxPointerCloseClickedId != 0) {
- this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId);
- this._summaryBoxPointerCloseClickedId = 0;
- }
- this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId);
- this._summaryBoxPointerDoneDisplayingId = 0;
let sourceNotificationStackDoneShowing = null;
if (doneShowingNotificationStack) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]