From 330609e88710cb0faf8bf227d6cbe5a7fefef858 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Fri, 12 Mar 2021 16:35:59 +0100 Subject: [PATCH] backends/input-settings: Don't bind mouse GSettings to ClutterSettings On Wayland MetaInputSettings is part of the input thread. Connecting a GSettings binding to the default ClutterSettings could result in the change notification being emitted on the input thread. This then could end up triggering the same handler from two different threads at the same time. In the case of the ClutterText layout cache it was attempting to unref the same layout twice, leading to a crash. This can be avoided by simply removing the GSettings bind. This does not cause changes to this setting to be missed by ClutterSettings because it itself already sets up a bind. Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1696 Part-of: --- src/backends/meta-input-settings.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/backends/meta-input-settings.c b/src/backends/meta-input-settings.c index 11bf713ef..79f72ff17 100644 --- a/src/backends/meta-input-settings.c +++ b/src/backends/meta-input-settings.c @@ -1796,10 +1796,6 @@ meta_input_settings_init (MetaInputSettings *settings) g_signal_connect (priv->mouse_settings, "changed", G_CALLBACK (meta_input_settings_changed_cb), settings); - g_settings_bind (priv->mouse_settings, "double-click", - clutter_settings_get_default(), "double-click-time", - G_SETTINGS_BIND_GET); - priv->touchpad_settings = g_settings_new ("org.gnome.desktop.peripherals.touchpad"); g_signal_connect (priv->touchpad_settings, "changed", G_CALLBACK (meta_input_settings_changed_cb), settings);