[virt-tools-list] [PATCH virt-viewer 2/2] Don't try to re-configure displays when there are none
Jonathon Jongsma
jjongsma at redhat.com
Tue Oct 7 18:30:04 UTC 2014
virt_viewer_session_on_monitor_geometry_changed() gets called
immediately upon agent connection, but sometimes this is before any
displays have been received. Simply return early when this is the case.
---
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 4262eda..46ea34c 100644
--- a/src/virt-viewer-session.c
+++ b/src/virt-viewer-session.c
@@ -362,6 +362,9 @@ virt_viewer_session_on_monitor_geometry_changed(VirtViewerSession* self,
nmonitors = MAX(nth + 1, nmonitors);
}
+ if (nmonitors == 0)
+ return;
+
monitors = g_new0(GdkRectangle, nmonitors);
for (l = self->priv->displays; l; l = l->next) {
VirtViewerDisplay *d = VIRT_VIEWER_DISPLAY(l->data);
--
1.9.3
More information about the virt-tools-list
mailing list