[gnome-shell] AppIcon: Nullify _draggable if available on destruction



commit 209d332a30fff85f4d607111445ab8c0fa15c195
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Fri Aug 9 23:30:44 2019 +0200

    AppIcon: Nullify _draggable if available on destruction
    
    When an AppIcon actor is destroyed we try to unset a non-existent draggable
    property.
    
    Fix the typo, doing this even if we're not currently in a drag operation.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/677

 js/ui/appDisplay.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 50b8fd9b9d..ac6d8ce254 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1897,9 +1897,10 @@ var AppIcon = class AppIcon {
         }
         if (this._stateChangedId > 0)
             this.app.disconnect(this._stateChangedId);
-        if (this._draggable && this._dragging) {
-            Main.overview.endItemDrag(this);
-            this.draggable = null;
+        if (this._draggable) {
+            if (this._dragging)
+                Main.overview.endItemDrag(this);
+            this._draggable = null;
         }
         this._stateChangedId = 0;
         this._removeMenuTimeout();


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