diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-10-01 20:01:47 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2010-10-01 20:01:47 +0200 |
commit | a2d645ffe3fa23e8c57950987c93c0fe8822238b (patch) | |
tree | 76621a76bdc10c4dd86c91300c98870859ada29a /client/windows | |
parent | c6e9c52a2a588fa11f516e96f3ba5fea3cd67274 (diff) | |
download | spice-a2d645ffe3fa23e8c57950987c93c0fe8822238b.tar.gz spice-a2d645ffe3fa23e8c57950987c93c0fe8822238b.tar.xz spice-a2d645ffe3fa23e8c57950987c93c0fe8822238b.zip |
Change VD_AGENT_CLIPBOARD_GRAB to an array of types
A clipboard owner can indicate that it can supply the data the clipboard
owns in multiple formats, so make the data passed with a
VD_AGENT_CLIPBOARD_GRAB message an array of types rather then a single
type.
Diffstat (limited to 'client/windows')
-rw-r--r-- | client/windows/platform.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/client/windows/platform.cpp b/client/windows/platform.cpp index 95876dc5..2a629440 100644 --- a/client/windows/platform.cpp +++ b/client/windows/platform.cpp @@ -51,7 +51,7 @@ static ProcessLoop* main_loop = NULL; class DefaultClipboardListener: public Platform::ClipboardListener { public: - virtual void on_clipboard_grab(uint32_t type) {} + virtual void on_clipboard_grab(uint32_t *types, uint32_t type_count) {} virtual void on_clipboard_request(uint32_t type) {} virtual void on_clipboard_notify(uint32_t type, uint8_t* data, int32_t size) {} }; @@ -151,7 +151,7 @@ static LRESULT CALLBACK PlatformWinProc(HWND hWnd, UINT message, WPARAM wParam, if (!clipboard_changer) { uint32_t type = get_available_clipboard_type(); if (type) { - clipboard_listener->on_clipboard_grab(type); + clipboard_listener->on_clipboard_grab(&type, 1); } else { LOG_INFO("Unsupported clipboard format"); } @@ -856,12 +856,13 @@ void WinPlatform::exit_modal_loop() modal_loop_active = false; } -bool Platform::set_clipboard_owner(uint32_t type) +bool Platform::set_clipboard_owner(uint32_t *types, uint32_t type_count) { - uint32_t format = get_clipboard_format(type); + /* FIXME use all types rather then just the first one */ + uint32_t format = get_clipboard_format(types[0]); if (!format) { - LOG_INFO("Unsupported clipboard type %u", type); + LOG_INFO("Unsupported clipboard type %u", types[0]); return false; } if (!OpenClipboard(platform_win)) { |