[virt-tools-list] [PATCH virt-viewer v2 1/7] SessionSpice: keep a list of display channels
Jonathon Jongsma
jjongsma at redhat.com
Tue Apr 21 20:34:29 UTC 2015
---
src/virt-viewer-session-spice.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
index 717d229..58f2af5 100644
--- a/src/virt-viewer-session-spice.c
+++ b/src/virt-viewer-session-spice.c
@@ -58,6 +58,7 @@ struct _VirtViewerSessionSpicePrivate {
gboolean has_sw_smartcard_reader;
guint pass_try;
gboolean did_auto_conf;
+ GList *display_channels;
};
#define VIRT_VIEWER_SESSION_SPICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE((o), VIRT_VIEWER_TYPE_SESSION_SPICE, VirtViewerSessionSpicePrivate))
@@ -146,6 +147,7 @@ virt_viewer_session_spice_dispose(GObject *obj)
spice->priv->audio = NULL;
g_clear_object(&spice->priv->main_window);
+ g_clear_pointer(&spice->priv->display_channels, (GDestroyNotify*)g_list_free);
G_OBJECT_CLASS(virt_viewer_session_spice_parent_class)->dispose(obj);
}
@@ -790,6 +792,7 @@ virt_viewer_session_spice_channel_new(SpiceSession *s,
G_CALLBACK(virt_viewer_session_spice_display_monitors), self, 0);
spice_channel_connect(channel);
+ self->priv->display_channels = g_list_append(self->priv->display_channels, channel);
}
if (SPICE_IS_INPUTS_CHANNEL(channel)) {
--
2.1.0
More information about the virt-tools-list
mailing list