messageTray: remove overview special handling

Don't show the message tray in the overview by default. From now on the
message tray in overview behaves as regularly, i.e. it will slide up the
overview on Super+M keypress.

https://bugzilla.gnome.org/show_bug.cgi?id=693987
This commit is contained in:
Cosimo Cecchi 2013-02-16 15:34:33 -05:00
parent 31270c36d2
commit 060c049056
2 changed files with 12 additions and 32 deletions

View File

@ -1310,11 +1310,6 @@ StScrollBar StButton#vhandle:active {
height: 72px; height: 72px;
} }
#message-tray:overview {
background: rgba(0, 0, 0, 0.1);
outline: 1px solid rgba(128, 128, 128, 0.3);
}
.message-tray-summary { .message-tray-summary {
height: 72px; height: 72px;
} }

View File

@ -1680,7 +1680,7 @@ const MessageTray = new Lang.Class({
this._desktopClone = null; this._desktopClone = null;
this._inCtrlAltTab = false; this._inCtrlAltTab = false;
this._lightbox = new Lightbox.Lightbox(global.window_group, this._lightbox = new Lightbox.Lightbox(global.overlay_group,
{ inhibitEvents: true, { inhibitEvents: true,
fadeInTime: ANIMATION_TIME, fadeInTime: ANIMATION_TIME,
fadeOutTime: ANIMATION_TIME, fadeOutTime: ANIMATION_TIME,
@ -1699,13 +1699,11 @@ const MessageTray = new Lang.Class({
function() { function() {
this._overviewVisible = true; this._overviewVisible = true;
this._grabHelper.ungrab(); // drop modal grab if necessary this._grabHelper.ungrab(); // drop modal grab if necessary
this.actor.add_style_pseudo_class('overview');
this._updateState(); this._updateState();
})); }));
Main.overview.connect('hiding', Lang.bind(this, Main.overview.connect('hiding', Lang.bind(this,
function() { function() {
this._overviewVisible = false; this._overviewVisible = false;
this._escapeTray();
this._updateState(); this._updateState();
})); }));
@ -2271,16 +2269,15 @@ const MessageTray = new Lang.Class({
} }
// Summary // Summary
let summarySummoned = this._pointerInSummary || this._overviewVisible || this._traySummoned; let summarySummoned = this._pointerInSummary || this._traySummoned;
let summaryPinned = this._pointerInTray || summarySummoned || this._locked; let summaryPinned = this._pointerInTray || summarySummoned || this._locked;
let summaryHovered = this._pointerInTray || this._pointerInSummary; let summaryHovered = this._pointerInTray || this._pointerInSummary;
let notificationsVisible = this._notificationState != State.HIDDEN; let notificationsVisible = this._notificationState != State.HIDDEN;
let notificationsDone = !notificationsVisible && !notificationsPending; let notificationsDone = !notificationsVisible && !notificationsPending;
let summaryOptionalInOverview = this._overviewVisible && !this._locked && !summaryHovered; let mustHideSummary = ((notificationsPending && notificationUrgent)
let mustHideSummary = (notificationsPending && (notificationUrgent || summaryOptionalInOverview)) || notificationsVisible || !Main.sessionMode.hasNotifications);
|| notificationsVisible || !Main.sessionMode.hasNotifications;
if (this._summaryState == State.HIDDEN && !mustHideSummary && summarySummoned) if (this._summaryState == State.HIDDEN && !mustHideSummary && summarySummoned)
this._showSummary(); this._showSummary();
@ -2327,8 +2324,7 @@ const MessageTray = new Lang.Class({
// Desktop clone // Desktop clone
let desktopCloneIsVisible = (this._desktopCloneState == State.SHOWING || let desktopCloneIsVisible = (this._desktopCloneState == State.SHOWING ||
this._desktopCloneState == State.SHOWN); this._desktopCloneState == State.SHOWN);
let desktopCloneShouldBeVisible = (trayShouldBeVisible && let desktopCloneShouldBeVisible = (trayShouldBeVisible);
!this._overviewVisible);
if (!desktopCloneIsVisible && desktopCloneShouldBeVisible) { if (!desktopCloneIsVisible && desktopCloneShouldBeVisible) {
this._showDesktopClone(); this._showDesktopClone();
@ -2362,13 +2358,8 @@ const MessageTray = new Lang.Class({
}, },
_showTray: function() { _showTray: function() {
// Don't actually take a modal grab in the overview.
// Just add something to the grab stack that we can
// pop later.
let modal = !this._overviewVisible;
if (!this._grabHelper.grab({ actor: this.actor, if (!this._grabHelper.grab({ actor: this.actor,
modal: modal, modal: true,
onUngrab: Lang.bind(this, this._escapeTray) })) { onUngrab: Lang.bind(this, this._escapeTray) })) {
this._traySummoned = false; this._traySummoned = false;
return false; return false;
@ -2380,8 +2371,7 @@ const MessageTray = new Lang.Class({
transition: 'easeOutQuad' transition: 'easeOutQuad'
}); });
if (!this._overviewVisible) this._lightbox.show();
this._lightbox.show();
return true; return true;
}, },
@ -2404,8 +2394,10 @@ const MessageTray = new Lang.Class({
if (this._desktopClone) if (this._desktopClone)
this._desktopClone.destroy(); this._desktopClone.destroy();
this._desktopClone = new Clutter.Clone({ source: global.window_group, clip: new Clutter.Geometry(this._bottomMonitorGeometry) }); let cloneSource = this._overviewVisible ? global.overlay_group : global.window_group;
Main.uiGroup.insert_child_above(this._desktopClone, global.window_group); this._desktopClone = new Clutter.Clone({ source: cloneSource,
clip: new Clutter.Geometry(this._bottomMonitorGeometry) });
Main.uiGroup.insert_child_above(this._desktopClone, cloneSource);
this._desktopClone.x = 0; this._desktopClone.x = 0;
this._desktopClone.y = 0; this._desktopClone.y = 0;
this._desktopClone.show(); this._desktopClone.show();
@ -2426,9 +2418,7 @@ const MessageTray = new Lang.Class({
this._tween(this.actor, '_trayState', State.HIDDEN, this._tween(this.actor, '_trayState', State.HIDDEN,
{ y: 0, { y: 0,
time: ANIMATION_TIME, time: ANIMATION_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad'
onComplete: this._onTrayHidden,
onCompleteScope: this
}); });
// Note that we might have entered here without a grab, // Note that we might have entered here without a grab,
@ -2438,11 +2428,6 @@ const MessageTray = new Lang.Class({
this._lightbox.hide(); this._lightbox.hide();
}, },
_onTrayHidden: function() {
if (!this._overviewVisible)
this.actor.remove_style_pseudo_class('overview');
},
_hideDesktopClone: function() { _hideDesktopClone: function() {
this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN, this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
{ y: 0, { y: 0,