[mutter/wip/carlosg/picking-fixes: 1/4] backends: Disconnect MetaInputMapper signal connection on device dispose




commit 8bbf86fddfd5229a94af6fa502f5bcf3f4c0d43d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Dec 28 17:00:46 2020 +0100

    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.

 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 756cd1126f..df21ff71bf 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);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]