[gnome-shell] background: always add content to cache
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] background: always add content to cache
- Date: Tue, 26 Mar 2013 21:02:40 +0000 (UTC)
commit 3be489c69e4980bca8aa85808ed6628b69551071
Author: Ray Strode <rstrode redhat com>
Date: Fri Mar 22 15:01:29 2013 -0400
background: always add content to cache
We currently only add the first instance of a background
to the cache. This means if the actor associated with that
background is destroyed, the content will be evicted and
it will need to get reloaded, even if it's already loaded
on another actor.
This commit ensures every content gets added to the cache.
https://bugzilla.gnome.org/show_bug.cgi?id=696157
js/ui/background.js | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 0672dd1..aa238e7 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -84,10 +84,10 @@ const BackgroundCache = new Lang.Class({
} else {
content.load_gradient(params.shadingType, params.color, params.secondColor);
}
-
- this._patterns.push(content);
}
+ this._patterns.push(content);
+
return content;
},
@@ -165,6 +165,8 @@ const BackgroundCache = new Lang.Class({
if (params.cancellable && params.cancellable.is_cancelled())
content = null;
+ else
+ this._images.push(content);
if (params.onFinished)
params.onFinished(content);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]