[gnome-shell] background: Disconnect from 'prepare-for-sleep' signal
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] background: Disconnect from 'prepare-for-sleep' signal
- Date: Tue, 31 Jan 2017 13:01:03 +0000 (UTC)
commit b1dcea7cf1923bff49584751118fc8cf33f659a2
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Jan 30 13:29:13 2017 +0100
background: Disconnect from 'prepare-for-sleep' signal
This signal connection was keeping Background instances from being
garbage collected.
https://bugzilla.gnome.org/show_bug.cgi?id=777934
js/ui/background.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 9b36029..fc27898 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -254,7 +254,8 @@ const Background = new Lang.Class({
this._loadAnimation(this._animation.file);
}));
- LoginManager.getLoginManager().connect('prepare-for-sleep',
+ let loginManager = LoginManager.getLoginManager();
+ this._prepareForSleepId = loginManager.connect('prepare-for-sleep',
(lm, aboutToSuspend) => {
if (aboutToSuspend)
return;
@@ -283,6 +284,10 @@ const Background = new Lang.Class({
this._clock.disconnect(this._timezoneChangedId);
this._timezoneChangedId = 0;
+ if (this._prepareForSleepId != 0)
+ LoginManager.getLoginManager().disconnect(this._prepareForSleepId);
+ this._prepareForSleepId = 0;
+
if (this._settingsChangedSignalId != 0)
this._settings.disconnect(this._settingsChangedSignalId);
this._settingsChangedSignalId = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]