[gnome-shell/wip/rstrode/login-screen-extensions: 79/134] appDisplay: Add destroy handler for FolderIcon
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/login-screen-extensions: 79/134] appDisplay: Add destroy handler for FolderIcon
- Date: Thu, 26 Aug 2021 19:31:00 +0000 (UTC)
commit 0297a483f10611ba9db07533054419912f70b3b0
Author: Ray Strode <rstrode redhat com>
Date: Mon Jul 22 10:57:57 2019 -0400
appDisplay: Add destroy handler for FolderIcon
It is important that the FolderView of a FolderIcon always
gets destroyed before the AppFolderPopup, since the view
may or may not be in the popup, and the view should
get cleaned up exactly once in either case.
This commit adds a destroy handler on FolderIcon to ensure
things get taken down in the right order, and to make sure
the view isn't leaked if it's not yet part of the popup.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628
js/ui/appDisplay.js | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index dabf63bfd3..5a8f4f1bf5 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1156,6 +1156,7 @@ var FolderIcon = class FolderIcon {
this.view.actor.vscroll.adjustment.value = 0;
this._openSpaceForPopup();
});
+ this.actor.connect('destroy', this.onDestroy.bind(this));
this.actor.connect('notify::mapped', () => {
if (!this.actor.mapped && this._popup)
this._popup.popdown();
@@ -1165,6 +1166,13 @@ var FolderIcon = class FolderIcon {
this._redisplay();
}
+ onDestroy() {
+ this.view.actor.destroy();
+
+ if (this._popup)
+ this._popup.actor.destroy();
+ }
+
getAppIds() {
return this.view.getAllItems().map(item => item.id);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]