diff options
author | Alon Levy <alevy@redhat.com> | 2010-08-31 11:40:59 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2010-08-31 14:30:00 +0300 |
commit | c47def6e48a65addd2ed4c18a77bd5bb0dbf64eb (patch) | |
tree | 24aecd10e4946db6f79dab2cfa41f29e701a7089 /client | |
parent | 3ce690d58d9f21606ab4544cb174d75becd54371 (diff) | |
download | spice-c47def6e48a65addd2ed4c18a77bd5bb0dbf64eb.tar.gz spice-c47def6e48a65addd2ed4c18a77bd5bb0dbf64eb.tar.xz spice-c47def6e48a65addd2ed4c18a77bd5bb0dbf64eb.zip |
client: add default agent capabilities
Diffstat (limited to 'client')
-rw-r--r-- | client/red_client.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/client/red_client.cpp b/client/red_client.cpp index 6c6e0669..79f5e6d6 100644 --- a/client/red_client.cpp +++ b/client/red_client.cpp @@ -75,6 +75,12 @@ private: RedClient& _client; }; +uint32_t default_agent_caps[] = { + (1 << VD_AGENT_CAP_MOUSE_STATE) | + (1 << VD_AGENT_CAP_MONITORS_CONFIG) | + (1 << VD_AGENT_CAP_REPLY) + }; + void ClipboardEvent::response(AbstractProcessLoop& events_loop) { static_cast<RedClient*>(events_loop.get_owner())->send_agent_clipboard(); @@ -334,7 +340,12 @@ RedClient::RedClient(Application& application) , _glz_window (0, _glz_debug) { MainChannelLoop* message_loop = static_cast<MainChannelLoop*>(get_message_handler()); + uint32_t default_caps_size = SPICE_N_ELEMENTS(default_agent_caps); + _agent_caps_size = VD_AGENT_CAPS_SIZE; + ASSERT(VD_AGENT_CAPS_SIZE >= default_caps_size); + _agent_caps = new uint32_t[_agent_caps_size]; + memcpy(_agent_caps, default_agent_caps, default_caps_size); message_loop->set_handler(SPICE_MSG_MIGRATE, &RedClient::handle_migrate); message_loop->set_handler(SPICE_MSG_SET_ACK, &RedClient::handle_set_ack); message_loop->set_handler(SPICE_MSG_PING, &RedClient::handle_ping); |