Skip to content

Commit 28b7243

Browse files
committed
libvncclient: make client callback indicative for Extended Clipboard
A client which has GotXCutTextUTF8 set indicates it can handle UTF8 cuttext from the server. Older clients will not have this set and thus not opt in for UTF8 (and depending on the server implementation, thus not opt out from Latin1, resulting in no cuttext from server at all for them). re #552 (comment)
1 parent f241a4b commit 28b7243

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/libvncclient/rfbclient.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,9 +1447,10 @@ SetFormatAndEncodings(rfbClient* client)
14471447
encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingQemuExtendedKeyEvent);
14481448

14491449
#ifdef LIBVNCSERVER_HAVE_LIBZ
1450-
/* extendedclipboard */
1451-
if (se->nEncodings < MAX_ENCODINGS)
1452-
encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingExtendedClipboard);
1450+
/* extendedclipboard. tell server we support it if client has the callback set */
1451+
if(client->GotXCutTextUTF8)
1452+
if (se->nEncodings < MAX_ENCODINGS)
1453+
encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingExtendedClipboard);
14531454
#endif
14541455

14551456
/* client extensions */

0 commit comments

Comments
 (0)