Handle CopyRect like any other encoding
Avoids having to special case things. Keeps the code simpler.
diff --git a/common/rfb/CMsgWriter.cxx b/common/rfb/CMsgWriter.cxx
index 3d51060..6536eaf 100644
--- a/common/rfb/CMsgWriter.cxx
+++ b/common/rfb/CMsgWriter.cxx
@@ -113,9 +113,11 @@
// Remaining encodings
for (int i = encodingMax; i >= 0; i--) {
switch (i) {
+ case encodingCopyRect:
case encodingTight:
case encodingZRLE:
case encodingHextile:
+ /* These have already been sent earlier */
break;
default:
if ((i != preferredEncoding) && Decoder::supported(i))