From 20c18c1fc0fcad58bdf11309e245117ad147d219 Mon Sep 17 00:00:00 2001 From: Sebastien Lafargue Date: Thu, 3 Oct 2013 23:08:59 +0200 Subject: [PATCH] Suppress animation for titles in overview Because of the animation and collision with relayout, the title of windows in overview may not appear, mainly the first time we enter in overview With an animation delay of 0.1s, you'll not see the difference https://bugzilla.gnome.org/show_bug.cgi?id=709392 --- js/ui/workspace.js | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 52a737c2c..75683ba65 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -343,19 +343,6 @@ const WindowOverlay = new Lang.Class({ this._animateVisible(); }, - fadeIn: function() { - if (!this._hidden) - return; - - this.show(); - this.title.opacity = 0; - this._parentActor.raise_top(); - Tweener.addTween(this.title, - { opacity: 255, - time: CLOSE_BUTTON_FADE_TIME, - transition: 'easeOutQuad' }); - }, - chromeHeights: function () { return [Math.max(this.borderSize, this.closeButton.height - this.closeButton._overlap), this.title.height + this.title._spacing]; @@ -372,7 +359,6 @@ const WindowOverlay = new Lang.Class({ let border = this.border; Tweener.removeTweens(button); - Tweener.removeTweens(title); Tweener.removeTweens(border); let [cloneX, cloneY, cloneWidth, cloneHeight] = this._windowClone.slot; @@ -1142,7 +1128,7 @@ const Workspace = new Lang.Class({ clone.actor.set_scale(scale, scale); clone.actor.set_opacity(255); clone.overlay.relayout(false); - this._showWindowOverlay(clone, overlay, isOnCurrentWorkspace); + this._showWindowOverlay(clone, overlay); } } }, @@ -1172,23 +1158,19 @@ const Workspace = new Lang.Class({ time: Overview.ANIMATION_TIME, transition: 'easeOutQuad', onComplete: Lang.bind(this, function() { - this._showWindowOverlay(clone, overlay, true); + this._showWindowOverlay(clone, overlay); }) }); clone.overlay.relayout(true); }, - _showWindowOverlay: function(clone, overlay, fade) { + _showWindowOverlay: function(clone, overlay) { if (clone.inDrag) return; - if (overlay) { - if (fade) - overlay.fadeIn(); - else + if (overlay && overlay._hidden) overlay.show(); - } }, _delayedWindowRepositioning: function() {