[gnome-shell] messageTray: Don't add ourselves more than once to CtrlAltTabManager
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageTray: Don't add ourselves more than once to CtrlAltTabManager
- Date: Mon, 10 Dec 2012 10:51:06 +0000 (UTC)
commit c11f89e72a35c65142230860ba1fc7268d400fc6
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Dec 7 12:09:42 2012 +0100
messageTray: Don't add ourselves more than once to CtrlAltTabManager
This way _sessionUpdated() can be called multiple times without side
effects.
https://bugzilla.gnome.org/show_bug.cgi?id=689959
js/ui/messageTray.js | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 6b7199e..e72e959 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1485,6 +1485,7 @@ const MessageTray = new Lang.Class({
this._reNotifyAfterHideNotification = null;
this._inFullscreen = false;
this._desktopClone = null;
+ this._inCtrlAltTab = false;
this._lightbox = new Lightbox.Lightbox(global.window_group,
{ inhibitEvents: true,
@@ -1562,12 +1563,15 @@ const MessageTray = new Lang.Class({
},
_sessionUpdated: function() {
- if (Main.sessionMode.isLocked || Main.sessionMode.isGreeter)
+ if ((Main.sessionMode.isLocked || Main.sessionMode.isGreeter) && this._inCtrlAltTab) {
Main.ctrlAltTabManager.removeGroup(this._summary);
- else
+ this._inCtrlAltTab = false;
+ } else if (!this._inCtrlAltTab) {
Main.ctrlAltTabManager.addGroup(this._summary, _("Message Tray"), 'user-available-symbolic',
{ focusCallback: Lang.bind(this, this.toggleAndNavigate),
sortGroup: CtrlAltTab.SortGroup.BOTTOM });
+ this._inCtrlAltTab = true;
+ }
this._updateState();
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]