From d99f08b9c46a97a1f6c79aaa3113318c0337fb51 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 1 Sep 2011 11:35:25 -0400 Subject: [PATCH] layout: fix a few keyboard show/hide bugs https://bugzilla.gnome.org/show_bug.cgi?id=657986 --- js/ui/layout.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index a3fd4e1ce..b595365e9 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 }); },