[gnome-shell] messageTray: Always hide while the OSK is up



commit a534a6bf09f6d61a6284385b14d7a80409dfe45e
Author: Florian MÃllner <fmuellner gnome org>
Date:   Tue Feb 12 20:56:24 2013 +0100

    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

 data/theme/gnome-shell.css |    5 -----
 js/ui/messageTray.js       |   44 ++++++--------------------------------------
 2 files changed, 6 insertions(+), 43 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 599c842..6707dbe 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -1318,11 +1318,6 @@ StScrollBar StButton#vhandle:active {
     height: 72px;
 }
 
-#message-tray:keyboard {
-    /* Same as the OSK */
-    background: rgba(0, 0, 0, 0.8);
-}
-
 #message-tray:overview {
     background: rgba(0, 0, 0, 0.1);
     outline: 1px solid rgba(128, 128, 128, 0.3);
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 4daee88..d4bd7b5 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1597,7 +1597,6 @@ const MessageTray = new Lang.Class({
         if (Main.panel.statusArea.activities)
             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));
 
         this._trayState = State.HIDDEN;
@@ -1608,7 +1607,6 @@ const MessageTray = new Lang.Class({
         this._pointerInTray = false;
         this._pointerInKeyboard = false;
         this._keyboardVisible = false;
-        this._keyboardUnderMessageTray = false;
         this._summaryState = State.HIDDEN;
         this._pointerInSummary = 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) {
-        let keyboardUnderMessageTray = layoutManager.keyboardIndex == layoutManager.bottomIndex;
-        if (this._keyboardVisible == keyboardVisible &&
-            this._keyboardUnderMesssageTray == keyboardUnderMessageTray)
-            return;
-
         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();
     },
 
@@ -2276,7 +2244,8 @@ const MessageTray = new Lang.Class({
         let trayIsVisible = (this._trayState == State.SHOWING ||
                              this._trayState == State.SHOWN);
         let trayShouldBeVisible = (this._summaryState == State.SHOWING ||
-                                   this._summaryState == State.SHOWN);
+                                   this._summaryState == State.SHOWN) &&
+                                  !this._keyboardVisible;
         if (!trayIsVisible && trayShouldBeVisible)
             trayShouldBeVisible = this._showTray();
         else if (trayIsVisible && !trayShouldBeVisible)
@@ -2286,13 +2255,12 @@ const MessageTray = new Lang.Class({
         let desktopCloneIsVisible = (this._desktopCloneState == State.SHOWING ||
                                      this._desktopCloneState == State.SHOWN);
         let desktopCloneShouldBeVisible = (trayShouldBeVisible &&
-                                           !this._overviewVisible &&
-                                           (!this._keyboardVisible || !this._keyboardUnderMessageTray));
+                                           !this._overviewVisible);
 
         if (!desktopCloneIsVisible && desktopCloneShouldBeVisible) {
             this._showDesktopClone();
         } 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');
     },
 
-    _hideDesktopClone: function(now) {
+    _hideDesktopClone: function() {
         this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN,
                     { y: 0,
-                      time: now ? 0 : ANIMATION_TIME,
+                      time: ANIMATION_TIME,
                       transition: 'easeOutQuad',
                       onComplete: Lang.bind(this, function() {
                           this._desktopClone.destroy();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]