GUACAMOLE-2268: Gate VNC UTF-8 (Extended Clipboard) support behind config check.#671
Conversation
| have_vnc_extended_clipboard=yes | ||
| AC_CHECK_MEMBERS([rfbClient.GotXCutTextUTF8], | ||
| [], [have_vnc_extended_clipboard=no], | ||
| [[#include <rfb/rfbclient.h>]]) | ||
|
|
||
| if test "x${have_vnc_extended_clipboard}" = "xyes" | ||
| then | ||
| AC_DEFINE([LIBVNC_CLIENT_HAS_EXTENDED_CLIPBOARD],, | ||
| [Whether rfbClient supports the Extended Clipboard pseudo-encoding (UTF-8).]) | ||
| fi | ||
|
|
||
| fi |
There was a problem hiding this comment.
Just FYI - this is fine, and I will merge as-is, but this can be simpler - the AC_CHECK_MEMBERS macro will automatically define HAVE_RFBCLIENT_GOTXCUTTEXTUTF8 for you. For example, we use this with RDP support and the VerifyCertificateEx:
Lines 985 to 991 in c802cdc
Obviously the defines end up a little less nicely-named than what you have, but the configure.ac ends up a little simpler.
There was a problem hiding this comment.
Thanks for the tip! I modeled the fix based on support for libVNCserver support for the requestedResize. I'll keep this in mind for next my.
FYI, I implemented similar support for libVNCServer support FinishedFrameBufferUpdate. Once I began to test it, I realized the the base libVNCServer in GitHub supported FinishedFrameBufferUpdate so config support was not necessary.
SendClientCutTextUTF8 and rfbClient.GotXCutTextUTF8 are only available in libvncserver/libvncclient 0.9.15+.
This adds configure checks for the UTF-8 (Extended Clipboard) APIs and guards the affected call sites with #ifdefs. When unavailable, the VNC client falls back to the classic SendClientCutText path.
Testing