Fix crash on dconf update

Resolves: #2170067
This commit is contained in:
Florian Müllner 2023-02-15 17:10:41 +01:00
parent 65b20eb4c1
commit 7e841e3579
2 changed files with 52 additions and 1 deletions

View File

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

View File

@ -7,7 +7,7 @@
Name: gnome-shell-extensions Name: gnome-shell-extensions
Version: 40.7 Version: 40.7
Release: 6%{?dist} Release: 7%{?dist}
Summary: Modify and extend GNOME Shell functionality and behavior Summary: Modify and extend GNOME Shell functionality and behavior
License: GPLv2+ License: GPLv2+
@ -39,6 +39,7 @@ Patch016: 0001-desktop-icons-Don-t-grab-focus-on-click.patch
Patch017: 0001-desktopManager-Hook-into-LayoutManager-to-create-gri.patch Patch017: 0001-desktopManager-Hook-into-LayoutManager-to-create-gri.patch
Patch018: 0001-gesture-inhibitor-Allow-inhibiting-workspace-switch-.patch Patch018: 0001-gesture-inhibitor-Allow-inhibiting-workspace-switch-.patch
Patch019: 0001-desktop-icons-Don-t-use-blocking-IO.patch Patch019: 0001-desktop-icons-Don-t-use-blocking-IO.patch
Patch020: 0001-window-list-Explicitly-dispose-settings-on-destroy.patch
%description %description
GNOME Shell Extensions is a collection of extensions providing additional and GNOME Shell Extensions is a collection of extensions providing additional and
@ -427,6 +428,10 @@ workspaces.
%changelog %changelog
* Wed Feb 15 2023 Florian Müllner <fmuellner@redhat.com> - 40.7-7
- Fix crash on `dconf update`
Resolves: #2170067
* Wed Jan 18 2023 Florian Müllner <fmuellner@redhat.com> - 40.7-6 * Wed Jan 18 2023 Florian Müllner <fmuellner@redhat.com> - 40.7-6
- Avoid blocking IO in desktop-icons - Avoid blocking IO in desktop-icons
Resolves: #2162019 Resolves: #2162019