messageTray: Always hide while the OSK is up
The message tray currently operates in three modes: in the overview, normal, and while the on-screen keyboard is up. The last case is particularly odd, and exclusively used for chat-notifications. As users can still use the Chat application directly on touch-only devices, the additional mode isn't really justified, so remove it. https://bugzilla.gnome.org/show_bug.cgi?id=662687
This commit is contained in:
parent
2b0f219bfd
commit
a534a6bf09
@ -1318,11 +1318,6 @@ StScrollBar StButton#vhandle:active {
|
|||||||
height: 72px;
|
height: 72px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#message-tray:keyboard {
|
|
||||||
/* Same as the OSK */
|
|
||||||
background: rgba(0, 0, 0, 0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
#message-tray:overview {
|
#message-tray:overview {
|
||||||
background: rgba(0, 0, 0, 0.1);
|
background: rgba(0, 0, 0, 0.1);
|
||||||
outline: 1px solid rgba(128, 128, 128, 0.3);
|
outline: 1px solid rgba(128, 128, 128, 0.3);
|
||||||
|
@ -1597,7 +1597,6 @@ const MessageTray = new Lang.Class({
|
|||||||
if (Main.panel.statusArea.activities)
|
if (Main.panel.statusArea.activities)
|
||||||
this._grabHelper.addActor(Main.panel.statusArea.activities.hotCorner.actor);
|
this._grabHelper.addActor(Main.panel.statusArea.activities.hotCorner.actor);
|
||||||
|
|
||||||
Main.layoutManager.keyboardBox.connect('notify::hover', Lang.bind(this, this._onKeyboardHoverChanged));
|
|
||||||
Main.layoutManager.connect('keyboard-visible-changed', Lang.bind(this, this._onKeyboardVisibleChanged));
|
Main.layoutManager.connect('keyboard-visible-changed', Lang.bind(this, this._onKeyboardVisibleChanged));
|
||||||
|
|
||||||
this._trayState = State.HIDDEN;
|
this._trayState = State.HIDDEN;
|
||||||
@ -1608,7 +1607,6 @@ const MessageTray = new Lang.Class({
|
|||||||
this._pointerInTray = false;
|
this._pointerInTray = false;
|
||||||
this._pointerInKeyboard = false;
|
this._pointerInKeyboard = false;
|
||||||
this._keyboardVisible = false;
|
this._keyboardVisible = false;
|
||||||
this._keyboardUnderMessageTray = false;
|
|
||||||
this._summaryState = State.HIDDEN;
|
this._summaryState = State.HIDDEN;
|
||||||
this._pointerInSummary = false;
|
this._pointerInSummary = false;
|
||||||
this._notificationClosed = false;
|
this._notificationClosed = false;
|
||||||
@ -2103,38 +2101,8 @@ const MessageTray = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeyboardHoverChanged: function(keyboard) {
|
|
||||||
this._pointerInKeyboard = keyboard.hover;
|
|
||||||
|
|
||||||
if (!keyboard.hover) {
|
|
||||||
let event = Clutter.get_current_event();
|
|
||||||
if (event && event.type() == Clutter.EventType.LEAVE) {
|
|
||||||
let into = event.get_related();
|
|
||||||
if (into && this.actor.contains(into)) {
|
|
||||||
// Don't call _updateState, because pointerInTray is
|
|
||||||
// still false
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this._updateState();
|
|
||||||
},
|
|
||||||
|
|
||||||
_onKeyboardVisibleChanged: function(layoutManager, keyboardVisible) {
|
_onKeyboardVisibleChanged: function(layoutManager, keyboardVisible) {
|
||||||
let keyboardUnderMessageTray = layoutManager.keyboardIndex == layoutManager.bottomIndex;
|
|
||||||
if (this._keyboardVisible == keyboardVisible &&
|
|
||||||
this._keyboardUnderMesssageTray == keyboardUnderMessageTray)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this._keyboardVisible = keyboardVisible;
|
this._keyboardVisible = keyboardVisible;
|
||||||
this._keyboardUnderMessageTray = keyboardUnderMessageTray;
|
|
||||||
|
|
||||||
if (keyboardVisible && keyboardUnderMessageTray)
|
|
||||||
this.actor.add_style_pseudo_class('keyboard');
|
|
||||||
else
|
|
||||||
this.actor.remove_style_pseudo_class('keyboard');
|
|
||||||
|
|
||||||
this._updateState();
|
this._updateState();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2276,7 +2244,8 @@ const MessageTray = new Lang.Class({
|
|||||||
let trayIsVisible = (this._trayState == State.SHOWING ||
|
let trayIsVisible = (this._trayState == State.SHOWING ||
|
||||||
this._trayState == State.SHOWN);
|
this._trayState == State.SHOWN);
|
||||||
let trayShouldBeVisible = (this._summaryState == State.SHOWING ||
|
let trayShouldBeVisible = (this._summaryState == State.SHOWING ||
|
||||||
this._summaryState == State.SHOWN);
|
this._summaryState == State.SHOWN) &&
|
||||||
|
!this._keyboardVisible;
|
||||||
if (!trayIsVisible && trayShouldBeVisible)
|
if (!trayIsVisible && trayShouldBeVisible)
|
||||||
trayShouldBeVisible = this._showTray();
|
trayShouldBeVisible = this._showTray();
|
||||||
else if (trayIsVisible && !trayShouldBeVisible)
|
else if (trayIsVisible && !trayShouldBeVisible)
|
||||||
@ -2286,13 +2255,12 @@ const MessageTray = new Lang.Class({
|
|||||||
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 &&
|
!this._overviewVisible);
|
||||||
(!this._keyboardVisible || !this._keyboardUnderMessageTray));
|
|
||||||
|
|
||||||
if (!desktopCloneIsVisible && desktopCloneShouldBeVisible) {
|
if (!desktopCloneIsVisible && desktopCloneShouldBeVisible) {
|
||||||
this._showDesktopClone();
|
this._showDesktopClone();
|
||||||
} else if (desktopCloneIsVisible && !desktopCloneShouldBeVisible) {
|
} else if (desktopCloneIsVisible && !desktopCloneShouldBeVisible) {
|
||||||
this._hideDesktopClone (this._keyboardVisible && this._keyboardUnderMessageTray);
|
this._hideDesktopClone();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2402,10 +2370,10 @@ const MessageTray = new Lang.Class({
|
|||||||
this.actor.remove_style_pseudo_class('overview');
|
this.actor.remove_style_pseudo_class('overview');
|
||||||
},
|
},
|
||||||
|
|
||||||
_hideDesktopClone: function(now) {
|
_hideDesktopClone: function() {
|
||||||
this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
|
this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
|
||||||
{ y: 0,
|
{ y: 0,
|
||||||
time: now ? 0 : ANIMATION_TIME,
|
time: ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad',
|
transition: 'easeOutQuad',
|
||||||
onComplete: Lang.bind(this, function() {
|
onComplete: Lang.bind(this, function() {
|
||||||
this._desktopClone.destroy();
|
this._desktopClone.destroy();
|
||||||
|
Loading…
Reference in New Issue
Block a user