From 2b3f696c8cde01f23bd16b8671de536ae0e001e4 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 15 Jan 2019 12:52:49 -0500 Subject: [PATCH 2/4] background: rebuild background, not just animation on resume Previously, we would only refresh the animation on resume (to handle clock skew). But we actually need to rebuild the background, too, on nvidia, so we should just do a full background change. --- js/ui/background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/background.js b/js/ui/background.js index b24f82536..c61d946a4 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -237,61 +237,61 @@ var Background = new Lang.Class({ params = Params.parse(params, { monitorIndex: 0, layoutManager: Main.layoutManager, settings: null, file: null, style: null }); this.background = new Meta.Background({ meta_screen: global.screen }); this.background._delegate = this; this._settings = params.settings; this._file = params.file; this._style = params.style; this._monitorIndex = params.monitorIndex; this._layoutManager = params.layoutManager; this._fileWatches = {}; this._cancellable = new Gio.Cancellable(); this.isLoaded = false; this._clock = new GnomeDesktop.WallClock(); this._timezoneChangedId = this._clock.connect('notify::timezone', () => { if (this._animation) this._loadAnimation(this._animation.file); }); let loginManager = LoginManager.getLoginManager(); this._prepareForSleepId = loginManager.connect('prepare-for-sleep', (lm, aboutToSuspend) => { if (aboutToSuspend) return; - this._refreshAnimation(); + this.emit('changed'); }); this._settingsChangedSignalId = this._settings.connect('changed', () => { this.emit('changed'); }); this._load(); }, destroy() { this._cancellable.cancel(); this._removeAnimationTimeout(); let i; let keys = Object.keys(this._fileWatches); for (i = 0; i < keys.length; i++) { this._cache.disconnect(this._fileWatches[keys[i]]); } this._fileWatches = null; if (this._timezoneChangedId != 0) this._clock.disconnect(this._timezoneChangedId); this._timezoneChangedId = 0; this._clock = null; if (this._prepareForSleepId != 0) LoginManager.getLoginManager().disconnect(this._prepareForSleepId); this._prepareForSleepId = 0; -- 2.18.1