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

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

 



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

_______________________________________________
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]