[PATCH spice-gtk 2/3] channel-display: Set monitors_max to 1 on init

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

 



This fixes remote-viewer with the new multi monitor support not working
when connecting to a spice-server without the new multi-monitor support.

Before this fix remote-viewer would hit the following g_return_if_fail:
(remote-viewer:24787): remote-viewer-CRITICAL **:
 virt_viewer_session_spice_display_monitors:
  assertion `monitors->len <= monitors_max' failed

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
 gtk/channel-display.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index 72d2c12..4ed3bbb 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -696,6 +696,7 @@ static void spice_display_channel_init(SpiceDisplayChannel *channel)
 #if defined(WIN32)
     c->dc = create_compatible_dc();
 #endif
+    c->monitors_max = 1;
     spice_display_channel_reset_capabilities(SPICE_CHANNEL(channel));
 }
 
-- 
1.7.10.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]