diff --git a/js/ui/background.js b/js/ui/background.js index 91e6be0f1..d08e2ec36 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -758,11 +758,19 @@ var BackgroundManager = class BackgroundManager { this._updateBackgroundActor(); }); - let loadedSignalId = background.connect('loaded', () => { - background.disconnect(loadedSignalId); - loadedSignalId = null; - this.emit('loaded'); - }); + let loadedSignalId; + if (background.isLoaded) { + GLib.idle_add(GLib.PRIORITY_DEFAULT, () => { + this.emit('loaded'); + return GLib.SOURCE_REMOVE; + }); + } else { + loadedSignalId = background.connect('loaded', () => { + background.disconnect(loadedSignalId); + loadedSignalId = null; + this.emit('loaded'); + }); + } backgroundActor.connect('destroy', () => { if (changeSignalId)