[virt-tools-list] [PATCH virt-viewer 12/19] Prevent from adding the same display several time in the session
Marc-André Lureau
marcandre.lureau at gmail.com
Mon Jul 16 16:57:47 UTC 2012
---
src/virt-viewer-session.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c
index 18b6922..9249a1f 100644
--- a/src/virt-viewer-session.c
+++ b/src/virt-viewer-session.c
@@ -282,6 +282,9 @@ virt_viewer_session_new(void)
void virt_viewer_session_add_display(VirtViewerSession *session,
VirtViewerDisplay *display)
{
+ if (g_list_find(session->priv->displays, display))
+ return;
+
session->priv->displays = g_list_append(session->priv->displays, display);
g_object_ref(display);
g_signal_emit_by_name(session, "session-display-added", display);
--
1.7.10.4
More information about the virt-tools-list
mailing list