[gnome-shell] appDisplay: Add a null-check for the scrollview's fade ClutterEffect



commit d8e7fc403bc47f950842d1816755bd5d0a9c638d
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Thu Jun 15 12:43:58 2017 +0100

    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 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 7ebd968..c9541b4 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();
     },
 


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