From d8e7fc403bc47f950842d1816755bd5d0a9c638d Mon Sep 17 00:00:00 2001 From: Mario Sanchez Prada Date: Thu, 15 Jun 2017 12:43:58 +0100 Subject: [PATCH] appDisplay: Add a null-check for the scrollview's fade ClutterEffect This effect will only be created when the StScrollView actor has either a non-zero vertical or horizontal fade offset defined, so we need to add a null-check in these two cases before assuming it's there. https://bugzilla.gnome.org/show_bug.cgi?id=783823 --- js/ui/appDisplay.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 7ebd968d8..c9541b479 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -447,7 +447,10 @@ const AllView = new Lang.Class({ })); this._grid.connect('space-opened', Lang.bind(this, function() { - this._scrollView.get_effect('fade').enabled = false; + let fadeEffect = this._scrollView.get_effect('fade'); + if (fadeEffect) + fadeEffect.enabled = false; + this.emit('space-ready'); })); this._grid.connect('space-closed', Lang.bind(this, @@ -658,7 +661,11 @@ const AllView = new Lang.Class({ _closeSpaceForPopup: function() { this._updateIconOpacities(false); - this._scrollView.get_effect('fade').enabled = true; + + let fadeEffect = this._scrollView.get_effect('fade'); + if (fadeEffect) + fadeEffect.enabled = true; + this._grid.closeExtraSpace(); },