diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-06-26 21:49:37 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-07-16 17:46:41 +0200 |
commit | 4ea133feb82c83a0ed0daaad381101b0afd5f3a5 (patch) | |
tree | 943ef3579bf0665929d5b954d59b9e902a65cf05 | |
parent | be8ff99571478deb5c8d116134f65ed2b788dbd3 (diff) |
main: send monitor config immediately
The only way this can be called currently is via the main/system
coroutine. Remove display timer if any.
-rw-r--r-- | gtk/channel-main.c | 9 |
1 files 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; } |