diff src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java @ 353:eba44a31e868

remove filterSingleDisplay option in retina version
author oc
date Mon, 23 Feb 2015 17:43:45 +0900
parents 024ac6e457f4
children 59b1ef1b0a89
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java	Mon Feb 23 15:31:55 2015 +0900
+++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java	Mon Feb 23 17:43:45 2015 +0900
@@ -89,7 +89,7 @@
 
         if(!rfb.getCuiVersion())
             if (rfb.filterSingleDisplay) {
-                renderer = repaintController.createRenderer(reader, rfb.getSingleWidth(), rfb.getSingleHeight(), context.getPixelFormat());
+                renderer = repaintController.createRenderer(reader, context.getFbWidth(), context.getFbHeight(), context.getPixelFormat());
                 fullscreenFbUpdateIncrementalRequest = new FramebufferUpdateRequestMessage(0, 0, rfb.getSingleWidth(), rfb.getSingleHeight(), true);
             } else {
                 renderer = repaintController.createRenderer(reader, context.getFbWidth(), context.getFbHeight(), context.getPixelFormat());
@@ -183,7 +183,7 @@
                 StringWriter sw = new StringWriter();
                 PrintWriter pw = new PrintWriter(sw);
                 te.printStackTrace(pw);
-                logger.severe(te.getMessage());
+                logger.severe("updateRectangle record failed : " + te.getMessage());
                 if (isRunning) {
                     context.cleanUpSession(te.getMessage() + "\n" + sw.toString());
                 }
@@ -220,7 +220,7 @@
         clipboardController.updateSystemClipboard(reader.readBytes(length));
     }
 
-    public void framebufferUpdateMessage() throws CommonException {
+    public void framebufferUpdateMessage() throws Exception {
 
         try {
             reader.readByte(); // padding
@@ -236,10 +236,14 @@
                 Decoder decoder = decoders.getDecoderByType(rect.getEncodingType());
                 logger.finest(rect.toString() + (0 == numberOfRectangles ? "\n---" : ""));
                 if (decoder != null) {
-                    decoder.decode(reader, renderer, rect);  // TreeVNC processing here
-                    if (rfb.getCuiVersion()) continue;
-                    if (rfb.filterSingleDisplay && rect.x >= rfb.getSingleWidth()) continue;
-                    repaintController.repaintBitmap(rect);
+                    try {
+                        decoder.decode(reader, renderer, rect);  // TreeVNC processing here
+                        if (rfb.getCuiVersion()) continue;
+                        if (rfb.filterSingleDisplay && rect.x >= rfb.getSingleWidth()) continue;
+                        repaintController.repaintBitmap(rect);
+                    } catch (Exception e) {
+                        throw e;
+                    }
                 } else if (rect.getEncodingType() == EncodingType.RICH_CURSOR) {
                     RichCursorDecoder.getInstance().decode(reader, renderer, rect);
                     if(repaintController!=null)