[mutter] monitor-config-manager: Define cleanup functions for structs



commit 3dbec4d7090eb8b664b9b69344796366b9896b93
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Wed Apr 3 00:21:04 2019 +0200

    monitor-config-manager: Define cleanup functions for structs
    
    Monitor configuration structures can be used inside containers such as GList
    and in order to have smart cleanups we need to define the relative free function
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/522>

 src/backends/meta-monitor-config-manager.h | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/backends/meta-monitor-config-manager.h b/src/backends/meta-monitor-config-manager.h
index 86756a7e33..192d915363 100644
--- a/src/backends/meta-monitor-config-manager.h
+++ b/src/backends/meta-monitor-config-manager.h
@@ -198,4 +198,11 @@ gboolean meta_verify_monitors_config (MetaMonitorsConfig *config,
                                       MetaMonitorManager *monitor_manager,
                                       GError            **error);
 
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaMonitorConfig, meta_monitor_config_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaLogicalMonitorConfig,
+                               meta_logical_monitor_config_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaMonitorsConfigKey,
+                               meta_monitors_config_key_free)
+
 #endif /* META_MONITOR_CONFIG_MANAGER_H */


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