[gnome-shell] background: Don't prematurely remove file monitors
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] background: Don't prematurely remove file monitors
- Date: Fri, 13 Dec 2013 16:50:42 +0000 (UTC)
commit 01f740ce69017f6305dd579c2eab55f0076ca6f6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Dec 12 14:42:41 2013 -0500
background: Don't prematurely remove file monitors
We need to only remove file monitors when there's no other users
of the content...
js/ui/background.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index a56a0af..20a3a40 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -125,7 +125,8 @@ const BackgroundCache = new Lang.Class({
removeImageContent: function(content) {
let filename = content.get_filename();
- if (filename && this._fileMonitors[filename])
+ let hasOtherUsers = this._images.some(function(content) { return filename == content.get_filename();
});
+ if (!hasOtherUsers)
delete this._fileMonitors[filename];
this._removeContent(this._images, content);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]