Support for VideoRectangleSelection client message in the server code. The message is read but ignored (only a message will be written to stderr).


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2559 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/VNCServerST.h b/common/rfb/VNCServerST.h
index fad8cb9..81ad4ec 100644
--- a/common/rfb/VNCServerST.h
+++ b/common/rfb/VNCServerST.h
@@ -192,6 +192,16 @@
 
     void setFTManager(rfb::SFileTransferManager *pFTManager) { m_pFTManager = pFTManager; };
 
+    // Enable/disable support for TightVNC-specific VideoRectangleSelection
+    // client message. This is a protocol option that lets a client select a
+    // rectangle to be treated by the server as video data. Once selected, this
+    // part of the framebuffer will be sent using JpegEncoder, on each update
+    // request, as we expect that video data is changing continuously. By
+    // default, this option is disabled, as it's rather a specialized feature
+    // and video selection GUI can confuse users of the TightVNC client.
+    void enableVideoSelection(bool enable) { m_videoSelectionEnabled = enable; }
+    bool isVideoSelectionEnabled() { return m_videoSelectionEnabled; }
+
   protected:
 
     friend class VNCSConnectionST;
@@ -239,6 +249,8 @@
     time_t lastConnectionTime;
 
     bool disableclients;
+
+    bool m_videoSelectionEnabled;
   };
 
 };