|
|
9062cd |
From a31f4b6ca703faab25c306dc33056763642a83cb Mon Sep 17 00:00:00 2001
|
|
|
9062cd |
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
9062cd |
Date: Fri, 30 Sep 2022 18:16:16 +0200
|
|
|
9062cd |
Subject: [PATCH] window-list: Explicitly dispose settings on destroy
|
|
|
9062cd |
|
|
|
9062cd |
This will not only disconnect the signal handler, but also remove
|
|
|
9062cd |
any bindings. This works around a crash that happens if a setting
|
|
|
9062cd |
that triggers the binding changes at the same time as a setting
|
|
|
9062cd |
that rebuilds the window list; in that case, the binding handler
|
|
|
9062cd |
runs after gjs has dropped its wrapper object, but before the
|
|
|
9062cd |
binding is removed automaticalled when the object is finalized.
|
|
|
9062cd |
|
|
|
9062cd |
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/416
|
|
|
9062cd |
|
|
|
9062cd |
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/243>
|
|
|
9062cd |
---
|
|
|
9062cd |
extensions/window-list/extension.js | 6 +++---
|
|
|
9062cd |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
9062cd |
|
|
|
9062cd |
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
|
|
|
9062cd |
index 89413818..91ee3e6b 100644
|
|
|
9062cd |
--- a/extensions/window-list/extension.js
|
|
|
9062cd |
+++ b/extensions/window-list/extension.js
|
|
|
9062cd |
@@ -842,8 +842,8 @@ class WindowList extends St.Widget {
|
|
|
9062cd |
this._dndWindow = null;
|
|
|
9062cd |
|
|
|
9062cd |
this._settings = ExtensionUtils.getSettings();
|
|
|
9062cd |
- this._groupingModeChangedId = this._settings.connect(
|
|
|
9062cd |
- 'changed::grouping-mode', this._groupingModeChanged.bind(this));
|
|
|
9062cd |
+ this._settings.connect('changed::grouping-mode',
|
|
|
9062cd |
+ () => this._groupingModeChanged());
|
|
|
9062cd |
this._grouped = undefined;
|
|
|
9062cd |
this._groupingModeChanged();
|
|
|
9062cd |
}
|
|
|
9062cd |
@@ -1112,7 +1112,7 @@ class WindowList extends St.Widget {
|
|
|
9062cd |
Main.xdndHandler.disconnect(this._dragBeginId);
|
|
|
9062cd |
Main.xdndHandler.disconnect(this._dragEndId);
|
|
|
9062cd |
|
|
|
9062cd |
- this._settings.disconnect(this._groupingModeChangedId);
|
|
|
9062cd |
+ this._settings.run_dispose();
|
|
|
9062cd |
|
|
|
9062cd |
let windows = global.get_window_actors();
|
|
|
9062cd |
for (let i = 0; i < windows.length; i++)
|
|
|
9062cd |
--
|
|
|
9062cd |
2.39.1
|
|
|
9062cd |
|