diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-10-16 20:53:21 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2010-10-18 10:40:51 +0200 |
commit | 607d58f4eb7abeb29329f7ddc1a7aa3700bc95a3 (patch) | |
tree | abd08bab9b10d96761b468174e204fd5920ad30e /client | |
parent | 4d0e6e525c0d2007ff9846ff3593e654b8b2e0ba (diff) | |
download | spice-607d58f4eb7abeb29329f7ddc1a7aa3700bc95a3.tar.gz spice-607d58f4eb7abeb29329f7ddc1a7aa3700bc95a3.tar.xz spice-607d58f4eb7abeb29329f7ddc1a7aa3700bc95a3.zip |
client: Do not try to send display_config until we've received the agent caps
Currenty, we check the agent caps in RedClient::handle_agent_connected
for VD_AGENT_CAP_DISPLAY_CONFIG and if present send display_config, but at
this time we have not received the caps yet, so remove this.
Also the send_agent_display_config call in on_agent_announce_capabilities
lacks a check for _agent_disp_config_sent, and we send the display config
before announcing that we may do so by sending our own caps, which seems
inpolite.
Diffstat (limited to 'client')
-rw-r--r-- | client/red_client.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/client/red_client.cpp b/client/red_client.cpp index b9e1421e..0fc48157 100644 --- a/client/red_client.cpp +++ b/client/red_client.cpp @@ -1011,11 +1011,6 @@ void RedClient::handle_agent_connected(RedPeer::InMessage* message) if (_auto_display_res && !_agent_mon_config_sent) { send_agent_monitors_config(); } - - if (VD_AGENT_HAS_CAPABILITY(_agent_caps, _agent_caps_size, - VD_AGENT_CAP_DISPLAY_CONFIG) && !_agent_disp_config_sent) { - send_agent_display_config(); - } } void RedClient::handle_agent_disconnected(RedPeer::InMessage* message) @@ -1037,15 +1032,15 @@ void RedClient::on_agent_announce_capabilities( } memcpy(_agent_caps, caps->caps, sizeof(_agent_caps[0]) * caps_size); + if (caps->request) { + send_agent_announce_capabilities(false); + } if (VD_AGENT_HAS_CAPABILITY(caps->caps, caps_size, - VD_AGENT_CAP_DISPLAY_CONFIG)) { + VD_AGENT_CAP_DISPLAY_CONFIG) && !_agent_disp_config_sent) { // not sending the color depth through send_agent_monitors_config, since // it applies only for attached screens. send_agent_display_config(); } - if (caps->request) { - send_agent_announce_capabilities(false); - } } void RedClient::on_agent_reply(VDAgentReply* reply) |