remoting: Fix reading UTF-8 clipboard data on Linux.
https://crrev.com/c/2410841 updated x_server_clipboard.cc to use Xproto, but introduced two errors that broke reading the clipboard in UTF-8 format. The first error has to do with how 32-bit properties are returned. With Xlib, such properties are returned as longs regardless of the platform, meaning they are actually returned as 64-bit values on 64-bit architectures. Xproto, however, always returns them as 32-bit values. The clipboard code, however, was still expecting longs. This change updates the clipboard code to expect 32-bit values as returned by Xproto. The second error was a mistranscription when converting RequestSelectionTargets from XConvertSelection to the equivalent Xproto call. Bug: 1149033 Change-Id: Ib3fe97fcbd0b0579a578858796e084901dd8a360 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537977Reviewed-by:Jamie Walch <jamiewalch@chromium.org> Reviewed-by:
Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Erik Jensen <rkjnsn@chromium.org> Cr-Commit-Position: refs/heads/master@{#827673}
Showing
Please register or sign in to comment