[Spice-devel] [PATCH spice-gtk 4/4] widget: avoid sending unwanted monitor configuration

Marc-André Lureau marcandre.lureau at redhat.com
Thu Apr 2 14:25:45 PDT 2015


spice_main_set_display_enabled() will schedule a timer to send the
monitor configuration to guest. However, this is undesired when
resize-guest is disabled. Use spice_main_update_display_enabled()
instead to skip the automatic timer.
---
 gtk/spice-widget.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index f5e8aab..f93e47a 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -294,6 +294,7 @@ static void update_monitor_area(SpiceDisplay *display)
     }
 
     if (!d->resize_guest_enable)
+        spice_main_update_display_enabled(d->main, get_display_id(display), TRUE, FALSE);
         spice_main_update_display(d->main, get_display_id(display),
                                   c->x, c->y, c->width, c->height, FALSE);
 
@@ -2427,7 +2428,8 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
             mark(display, primary.marked);
         }
         spice_channel_connect(channel);
-        spice_main_set_display_enabled(d->main, get_display_id(display), TRUE);
+        if (d->resize_guest_enable)
+            spice_main_set_display_enabled(d->main, get_display_id(display), TRUE);
         return;
     }
 
-- 
2.1.0



More information about the Spice-devel mailing list