From 96820a9979219b1d087d30f4cbc81abd376e4f29 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 28 Dec 2020 17:00:46 +0100 Subject: [PATCH] backends: Disconnect MetaInputMapper signal connection on device dispose This signal may be left dangling when disconnecting a device, and be executed later on if the device is connected again, and mapped to other output. Make it sure the signal handler is disconnected when unplugging the device. Part-of: --- src/backends/meta-input-mapper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backends/meta-input-mapper.c b/src/backends/meta-input-mapper.c index 756cd1126..df21ff71b 100644 --- a/src/backends/meta-input-mapper.c +++ b/src/backends/meta-input-mapper.c @@ -189,6 +189,7 @@ mapper_input_info_new (ClutterInputDevice *device, static void mapper_input_info_free (MetaMapperInputInfo *info) { + g_signal_handlers_disconnect_by_func (info->settings, settings_output_changed_cb, info); g_object_unref (info->settings); g_free (info); }