[Developement] Add copyrect handler code to copyrect decoder.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3463 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/src/com/tightvnc/decoder/CopyRectDecoder.java b/java/src/com/tightvnc/decoder/CopyRectDecoder.java
index 3fceb63..07a14bd 100644
--- a/java/src/com/tightvnc/decoder/CopyRectDecoder.java
+++ b/java/src/com/tightvnc/decoder/CopyRectDecoder.java
@@ -35,8 +35,16 @@
       dos.writeInt(CopyRectDecoder.EncodingCopyRect);
     }
 
-    //
-    // TODO: Place copy rect handler code here
-    //
+    int copyRectSrcX = rfbis.readU16();
+    int copyRectSrcY = rfbis.readU16();
+
+    // If the session is being recorded:
+    if (dos != null) {
+      dos.writeShort(copyRectSrcX);
+      dos.writeShort(copyRectSrcY);
+    }
+
+    graphics.copyArea(copyRectSrcX, copyRectSrcY, w, h,
+                      x - copyRectSrcX, y - copyRectSrcY);
   }
 }