[gnome-shell/gbsneto/custom-icon-positions: 14/40] appDisplay: Don't destroy FolderView directly
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/custom-icon-positions: 14/40] appDisplay: Don't destroy FolderView directly
- Date: Wed, 27 May 2020 22:42:17 +0000 (UTC)
commit e4f46c954ec3712fe14077aaf6d599be05d5375c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed May 20 16:22:36 2020 -0300
appDisplay: Don't destroy FolderView directly
When FolderIcon is destroyed, it destroyed the FolderView and, if
there's a folder dialog present, it destroys the dialog as well.
Turns out, the folder dialog adds the icon's FolderView to itself.
The view becomes part of the dialog's actor tree. When the dialog
is destroyed, it also tries to destroy the view - but the folder
view was already destroyed by FolderIcon!
Fix that by letting the dialog destroy the folder view if it exists,
otherwise destroy the folder view directly.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
js/ui/appDisplay.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 2511bc1c8f..2e989b827e 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1220,15 +1220,15 @@ var FolderIcon = GObject.registerClass({
this._dragMonitor = null;
}
- this.view.destroy();
+ if (this._dialog)
+ this._dialog.destroy();
+ else
+ this.view.destroy();
if (this._folderChangedId) {
this._folder.disconnect(this._folderChangedId);
delete this._folderChangedId;
}
-
- if (this._dialog)
- this._dialog.destroy();
}
vfunc_clicked() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]