[PATCH spice-gtk 2/4] main: send only pending monitor config changes

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

 



When agent is ready, do not send current monitor configuration
immediately unless there are pending changes.
---
 gtk/channel-main.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 3150208..c132ffa 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -1290,8 +1290,11 @@ static gboolean timer_set_display(gpointer data)
     SpiceSession *session;
     gint i;
 
-    if (!c->agent_connected)
+    c->display_timer_id = 0;
+    if (!c->agent_connected) {
+        c->display_timer_id = -1;
         return FALSE;
+    }
 
     session = spice_channel_get_session(SPICE_CHANNEL(channel));
 
@@ -1789,7 +1792,9 @@ static void main_agent_handle_msg(SpiceChannel *channel,
         }
         c->agent_caps_received = true;
         g_coroutine_signal_emit(self, signals[SPICE_MAIN_AGENT_UPDATE], 0);
-        update_display_timer(SPICE_MAIN_CHANNEL(channel), 0);
+
+        if (c->display_timer_id)
+            update_display_timer(SPICE_MAIN_CHANNEL(channel), 0);
 
         if (caps->request)
             agent_announce_caps(self);
-- 
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]