diff options
-rw-r--r-- | java/src/com/tightvnc/decoder/CopyRectDecoder.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/java/src/com/tightvnc/decoder/CopyRectDecoder.java b/java/src/com/tightvnc/decoder/CopyRectDecoder.java index 3fceb631..07a14bdb 100644 --- a/java/src/com/tightvnc/decoder/CopyRectDecoder.java +++ b/java/src/com/tightvnc/decoder/CopyRectDecoder.java @@ -35,8 +35,16 @@ public class CopyRectDecoder extends RawDecoder { 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); } } |