[Spice-devel] [PATCH spice-gtk 22/25] main: send monitor config immediately
Marc-André Lureau
marcandre.lureau at gmail.com
Thu Jul 12 15:29:19 PDT 2012
The only way this can be called currently is via the main/system
coroutine. Remove display timer if any.
---
gtk/channel-main.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index d7830ae..0c15dfa 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -916,8 +916,6 @@ static void monitors_align(VDAgentMonConfig *monitors, int nmonitors)
*
* Returns: %TRUE on success.
**/
-/* any context: the message is not flushed immediately,
- you can wakeup() the channel coroutine or send_msg_queue() */
gboolean spice_main_send_monitor_config(SpiceMainChannel *channel)
{
SpiceMainChannelPrivate *c;
@@ -966,6 +964,12 @@ gboolean spice_main_send_monitor_config(SpiceMainChannel *channel)
agent_msg_queue(channel, VD_AGENT_MONITORS_CONFIG, size, mon);
free(mon);
+ spice_channel_wakeup(SPICE_CHANNEL(channel), FALSE);
+ if (c->timer_id != 0) {
+ g_source_remove(c->timer_id);
+ c->timer_id = 0;
+ }
+
return TRUE;
}
@@ -1862,7 +1866,6 @@ static gboolean timer_set_display(gpointer data)
c->timer_id = 0;
if (c->agent_connected)
spice_main_send_monitor_config(SPICE_MAIN_CHANNEL(channel));
- spice_channel_wakeup(channel, FALSE);
return false;
}
--
1.7.10.4
More information about the Spice-devel
mailing list