From 766e9034e25edff4eb82ebfec46395f29e1a7b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Sat, 23 Nov 2019 19:57:02 +0100 Subject: [PATCH] appDisplay: Remove dragMonitor when FolderIcon is destroyed While it should be impossible to destroy a FolderIcon while a DnD action is still going on, there might still be rare cases where this happens (ie. when a folder is removed because an app got deleted during DnD). So make sure we're on the safe side here and don't potentially leave dragMonitors around after the icon is destroyed by removing the dragMonitor inside the onDestroy handler of the FolderIcon, just like we do for AppIcons. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/849 --- js/ui/appDisplay.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 62a99b9fe..0621acdae 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1515,6 +1515,11 @@ var FolderIcon = GObject.registerClass({ Main.overview.disconnect(this._itemDragBeginId); Main.overview.disconnect(this._itemDragEndId); + if (this._dragMonitor) { + DND.removeDragMonitor(this._dragMonitor); + this._dragMonitor = null; + } + this.view.destroy(); if (this._folderChangedId) {