From 9765a98a1063ef9bfc0a7cfee566e534384c601c Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 25 Sep 2014 12:12:47 +0200
Subject: [PATCH 2/3] remote-display: Stop plugin when exiting
Make sure that the plugin is stopped when it's disposed of.
https://bugzilla.redhat.com/show_bug.cgi?id=1145144
---
plugins/remote-display/gsd-remote-display-manager.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/plugins/remote-display/gsd-remote-display-manager.c b/plugins/remote-display/gsd-remote-display-manager.c
index b58b467..104678b 100644
--- a/plugins/remote-display/gsd-remote-display-manager.c
+++ b/plugins/remote-display/gsd-remote-display-manager.c
@@ -224,8 +224,29 @@ gsd_remote_display_manager_stop (GsdRemoteDisplayManager *manager)
}
static void
+gsd_remote_display_manager_finalize (GObject *object)
+{
+ GsdRemoteDisplayManager *manager;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (GSD_IS_REMOTE_DISPLAY_MANAGER (object));
+
+ manager = GSD_REMOTE_DISPLAY_MANAGER (object);
+
+ g_return_if_fail (manager->priv != NULL);
+
+ gsd_remote_display_manager_stop (manager);
+
+ G_OBJECT_CLASS (gsd_remote_display_manager_parent_class)->finalize (object);
+}
+
+static void
gsd_remote_display_manager_class_init (GsdRemoteDisplayManagerClass *klass)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = gsd_remote_display_manager_finalize;
+
g_type_class_add_private (klass, sizeof (GsdRemoteDisplayManagerPrivate));
}
--
2.1.0