From 2fcd74bbe897a87a6a60bae2db7cd2f21c30c641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 8 Apr 2011 15:56:06 +0200 Subject: [PATCH] gtk: don't send MonitorConfig after agent start We don't know yet what will be the guest previous configuration. Ie, what should we send otherwise? Current hardware configuration? This works badly with windowed mode, where we expect the same windows to be displayed on reconnection. --- gtk/channel-main.c | 7 ++++--- gtk/spice-widget.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gtk/channel-main.c b/gtk/channel-main.c index 79c5531..8d6ecb0 100644 --- a/gtk/channel-main.c +++ b/gtk/channel-main.c @@ -1045,9 +1045,10 @@ static void agent_start(SpiceMainChannel *channel) spice_msg_out_send_internal(out); spice_msg_out_unref(out); - agent_announce_caps(channel); - agent_monitors_config(channel); - agent_send_msg_queue(channel); + if (c->agent_connected) { + agent_announce_caps(channel); + agent_send_msg_queue(channel); + } } /* coroutine context */ diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c index bf92ef6..a82e7f9 100644 --- a/gtk/spice-widget.c +++ b/gtk/spice-widget.c @@ -1353,6 +1353,7 @@ static void mark(SpiceChannel *channel, gint mark, gpointer data) SPICE_DEBUG("widget mark: %d, channel %d", mark, d->channel_id); d->mark = mark; + spice_main_set_display_enabled(d->main, d->channel_id, d->mark != 0); if (mark != 0 && gtk_widget_get_window(GTK_WIDGET(display))) gdk_window_invalidate_rect(gtk_widget_get_window(GTK_WIDGET(display)), NULL, FALSE);