Avoid clipboard updates when not focused
We don't want to surprise the user with unexpected clipboard changes
when vncviewer is in the background, and it is both wasteful and
possibly insecure to inform the server of every clipboard update
when the user isn't interacting with it.
diff --git a/vncviewer/Viewport.h b/vncviewer/Viewport.h
index 170be0d..7bfc418 100644
--- a/vncviewer/Viewport.h
+++ b/vncviewer/Viewport.h
@@ -70,6 +70,9 @@
static void handleClipboardChange(int source, void *data);
+ void clearPendingClipboard();
+ void flushPendingClipboard();
+
void handlePointerEvent(const rfb::Point& pos, int buttonMask);
static void handlePointerTimeout(void *data);
@@ -107,6 +110,9 @@
unsigned int altGrCtrlTime;
#endif
+ const char* pendingServerCutText;
+ const char* pendingClientCutText;
+
rdr::U32 menuKeySym;
int menuKeyCode, menuKeyFLTK;
Fl_Menu_Button *contextMenu;