[Spice-devel] [PATCH spice-gtk 2/2] Notify of monitors when not using MonitorConfig

Marc-André Lureau marcandre.lureau at gmail.com
Fri Mar 15 17:02:30 PDT 2013


Windows guest don't use MonitorConfig, but we may want to notify the
client of the number of monitors.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=919530
---
 gtk/channel-display.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index c098ddb..2b44b43 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -889,6 +889,11 @@ static void spice_display_channel_up(SpiceChannel *channel)
     out = spice_msg_out_new(channel, SPICE_MSGC_DISPLAY_INIT);
     out->marshallers->msgc_display_init(out->marshaller, &init);
     spice_msg_out_send_internal(out);
+
+    /* if we are not using monitors config, notify of existence of
+       this monitor */
+    if (channel->priv->channel_id != 0)
+        g_object_notify_main_context(G_OBJECT(channel), "monitors");
 }
 
 #define DRAW(type) {                                                    \
-- 
1.8.1.1.439.g50a6b54



More information about the Spice-devel mailing list