[gnome-shell] chrome: don't show visibleInOverview chrome when the screensaver is active
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] chrome: don't show visibleInOverview chrome when the screensaver is active
- Date: Thu, 14 Jul 2011 16:51:26 +0000 (UTC)
commit 896d8e830caa668794d2a8b2d8c73104e2aa507f
Author: Dan Winship <danw gnome org>
Date: Mon Jun 6 11:05:34 2011 -0400
chrome: don't show visibleInOverview chrome when the screensaver is active
visibleInOverview chrome was visible even when the screensaver was
active. Although we may eventually need visibleInScreenSaver, that
should be a separate flag.
Fix this by tracking the screensaver active state, and hiding the chrome
when the screensaver is active.
https://bugzilla.gnome.org/show_bug.cgi?id=654550
js/ui/chrome.js | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/chrome.js b/js/ui/chrome.js
index f2a7d14..5dd21e5 100644
--- a/js/ui/chrome.js
+++ b/js/ui/chrome.js
@@ -8,6 +8,7 @@ const Signals = imports.signals;
const Main = imports.ui.main;
const Params = imports.misc.params;
+const ScreenSaver = imports.misc.screenSaver;
// This manages the shell "chrome"; the UI that's visible in the
// normal mode (ie, outside the Overview), that surrounds the main
@@ -49,6 +50,14 @@ Chrome.prototype = {
Main.overview.connect('hidden',
Lang.bind(this, this._overviewHidden));
+ this._screenSaverProxy = new ScreenSaver.ScreenSaverProxy();
+ this._screenSaverProxy.connect('ActiveChanged', Lang.bind(this, this._onScreenSaverActiveChanged));
+ this._screenSaverProxy.GetActiveRemote(Lang.bind(this,
+ function(result, err) {
+ if (!err)
+ this._onScreenSaverActiveChanged(this._screenSaverProxy, result);
+ }));
+
this._relayout();
},
@@ -212,6 +221,11 @@ Chrome.prototype = {
this._queueUpdateRegions();
},
+ _onScreenSaverActiveChanged: function(proxy, screenSaverActive) {
+ this.actor.visible = !screenSaverActive;
+ this._queueUpdateRegions();
+ },
+
_findMonitorForRect: function(x, y, w, h) {
// First look at what monitor the center of the rectangle is at
let cx = x + w/2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]