[gnome-shell] messageTray: Remove tray dwelling if we have new barrier features
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageTray: Remove tray dwelling if we have new barrier features
- Date: Fri, 8 Feb 2013 19:28:27 +0000 (UTC)
commit e614b993f2eb64a2cef9a070b404ee1b18d824b7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Jan 29 15:19:19 2013 -0500
messageTray: Remove tray dwelling if we have new barrier features
If we have the new barrier features, then we should not activate the
old tray dwelling mechanism.
https://bugzilla.gnome.org/show_bug.cgi?id=677215
js/ui/messageTray.js | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 1722861..457fc77 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1618,12 +1618,7 @@ const MessageTray = new Lang.Class({
this._sources = new Hash.Map();
this._chatSummaryItemsCount = 0;
- let pointerWatcher = PointerWatcher.getPointerWatcher();
- pointerWatcher.addWatch(TRAY_DWELL_CHECK_INTERVAL, Lang.bind(this, this._checkTrayDwell));
- this._trayDwellTimeoutId = 0;
- this._trayDwelling = false;
- this._trayDwellUserTime = 0;
-
+ this._setupTrayDwellIfNeeded();
this._sessionUpdated();
this._noMessages = new St.Label({ text: _("No Messages"),
@@ -1636,6 +1631,18 @@ const MessageTray = new Lang.Class({
this._updateNoMessagesLabel();
},
+ _setupTrayDwellIfNeeded: function() {
+ // If we don't have extended barrier features, then we need
+ // to support the old tray dwelling mechanism.
+ if (!global.display.supports_extended_barriers()) {
+ let pointerWatcher = PointerWatcher.getPointerWatcher();
+ pointerWatcher.addWatch(TRAY_DWELL_CHECK_INTERVAL, Lang.bind(this, this._checkTrayDwell));
+ this._trayDwellTimeoutId = 0;
+ this._trayDwelling = false;
+ this._trayDwellUserTime = 0;
+ }
+ },
+
_updateNoMessagesLabel: function() {
this._noMessages.visible = this._sources.size() == 0;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]