[gnome-shell] layout: fix a few keyboard show/hide bugs



commit d99f08b9c46a97a1f6c79aaa3113318c0337fb51
Author: Dan Winship <danw gnome org>
Date:   Thu Sep 1 11:35:25 2011 -0400

    layout: fix a few keyboard show/hide bugs
    
    https://bugzilla.gnome.org/show_bug.cgi?id=657986

 js/ui/layout.js |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index a3fd4e1..b595365 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -46,6 +46,7 @@ LayoutManager.prototype = {
         this._bottomBox = new St.BoxLayout({ name: 'bottomBox',
                                              vertical: true });
         this.addChrome(this._bottomBox, { visibleInFullscreen: true });
+        this._keyboardHeightNotifyId = 0;
 
         this.trayBox = new St.BoxLayout({ name: 'trayBox' }); 
         this.trayBox.connect('allocation-changed',
@@ -283,18 +284,22 @@ LayoutManager.prototype = {
         // anchor point changes
         this._chrome.updateRegions();
 
-        this._bottomBox.connect('notify::height', Lang.bind(this, function () {
-            this._bottomBoxAnchor = this._bottomBox.height;
+        this._keyboardHeightNotifyId = this._bottomBox.connect('notify::height', Lang.bind(this, function () {
+            this._bottomBox.anchor_y = this._bottomBox.height;
         }));
     },
 
     hideKeyboard: function (immediate) {
         Main.messageTray.hide();
+        if (this._keyboardHeightNotifyId) {
+            this._bottomBox.disconnect(this._keyboardHeightNotifyId);
+            this._keyboardHeightNotifyId = 0;
+        }
         Tweener.addTween(this._bottomBox,
                          { anchor_y: 0,
                            time: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
                            transition: 'easeOutQuad',
-                           onComplete: this._showKeyboardComplete,
+                           onComplete: this._hideKeyboardComplete,
                            onCompleteScope: this
                          });
     },



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