diff options
author | Arnon Gilboa <agilboa@redhat.com> | 2013-03-17 16:54:44 +0200 |
---|---|---|
committer | Arnon Gilboa <agilboa@redhat.com> | 2013-03-18 12:45:25 +0200 |
commit | 9b05b948fce1db343d6d57425194e72d2c850760 (patch) | |
tree | 987262e1d148ecf776a3bf512293153b0e1172ba /vdagent/vdagent.cpp | |
parent | 0ba6e29363856b84fbefb9e4f59f8450e0e57789 (diff) |
vdagent: on encoding only, use HBITMAP to keep the correct palette
for decoding, keep using CF_DIB and CxImage.CopyToHandle() as before.
Regression was due to commit da07ce (rhbz #919150)
rhbz #921980
Diffstat (limited to 'vdagent/vdagent.cpp')
-rw-r--r-- | vdagent/vdagent.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp index c56025d..1dcfd1a 100644 --- a/vdagent/vdagent.cpp +++ b/vdagent/vdagent.cpp @@ -42,7 +42,7 @@ typedef struct VDClipboardFormat { VDClipboardFormat clipboard_formats[] = { {CF_UNICODETEXT, {VD_AGENT_CLIPBOARD_UTF8_TEXT, 0}}, //FIXME: support more image types - {CF_BITMAP, {VD_AGENT_CLIPBOARD_IMAGE_PNG, VD_AGENT_CLIPBOARD_IMAGE_BMP, 0}}, + {CF_DIB, {VD_AGENT_CLIPBOARD_IMAGE_PNG, VD_AGENT_CLIPBOARD_IMAGE_BMP, 0}}, }; #define clipboard_formats_count (sizeof(clipboard_formats) / sizeof(clipboard_formats[0])) @@ -1008,6 +1008,10 @@ bool VDAgent::handle_clipboard_request(VDAgentClipboardRequest* clipboard_reques vd_printf("Unsupported clipboard type %u", clipboard_request->type); return false; } + // on encoding only, we use HBITMAP to keep the correct palette + if (format == CF_DIB) { + format = CF_BITMAP; + } if (!IsClipboardFormatAvailable(format) || !OpenClipboard(_hwnd)) { return false; } |