FLTK has support for both image and plain text clipboard data, we don't.
This means we only send plain text clipboard from the viewer to the
server. Some applications can get confused when we announce that
clipboard is available and later don't send anything. An example of such
an application is QGIS, in the remote session it froze when an image was
copied on the client side.
This fix means we only call announceClipboard() when the clipboard
contains plain text. That means TigerVNC is now more robust and doesn't
trigger freezes in buggy applications.
return;
#endif
+ if (!Fl::clipboard_contains(Fl::clipboard_plain_text)) {
+ vlog.debug("Got non-plain text in local clipboard, ignoring.");
+ return;
+ }
+
self->clipboardSource = source;
if (!self->hasFocus()) {