dateMenu: Block notification banners while the calendar is open

The new banner position interferes with the calendar drop-down. Resolve
this by blocking banners while the calendar is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=744850
This commit is contained in:
Florian Müllner
2015-02-13 23:53:18 +01:00
parent f6c84d6185
commit 8032e672e9
2 changed files with 15 additions and 1 deletions

View File

@ -1365,6 +1365,7 @@ const MessageTray = new Lang.Class({
this._onStatusChanged(proxy.status);
}));
this._busy = false;
this._bannerBlocked = false;
this._presence.connectSignal('StatusChanged', Lang.bind(this, function(proxy, senderName, [status]) {
this._onStatusChanged(status);
}));
@ -1478,6 +1479,13 @@ const MessageTray = new Lang.Class({
return this._notificationQueue.length;
},
set bannerBlocked(v) {
if (this._bannerBlocked == v)
return;
this._bannerBlocked = v;
this._updateState();
},
contains: function(source) {
return this._sources.has(source);
},
@ -1688,6 +1696,10 @@ const MessageTray = new Lang.Class({
// _updateState() figures out what (if anything) needs to be done
// at the present time.
_updateState: function() {
this.actor.visible = !this._bannerBlocked;
if (this._bannerBlocked)
return;
// If our state changes caused _updateState to be called,
// just exit now to prevent reentrancy issues.
if (this._updatingState)