diff src/main/java/com/glavsoft/rfb/protocol/Protocol.java @ 441:cee43ceac9b3

send thatscreen position INIT_DATA
author one
date Thu, 16 Jun 2016 21:08:19 +0900
parents 7e811f33b99d
children 3996fde6f8ed
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/Protocol.java	Thu Jun 16 20:35:44 2016 +0900
+++ b/src/main/java/com/glavsoft/rfb/protocol/Protocol.java	Thu Jun 16 21:08:19 2016 +0900
@@ -126,6 +126,7 @@
     @Override
     public void setFbWidth(int fbWidth) {
         this.fbWidth = fbWidth;
+        if (rfb != null) rfb.setWidth(fbWidth);
     }
 
     @Override
@@ -146,6 +147,7 @@
     @Override
     public void setFbHeight(int fbHeight) {
         this.fbHeight = fbHeight;
+        if (rfb != null) rfb.setHeight(fbHeight);
     }
 
     @Override
@@ -324,8 +326,7 @@
 
     @Override
     public int getNumberOfRectangle() {
-        int numberOfRectangles = receiverTask.numberOfRectangles;
-        return numberOfRectangles;
+        return receiverTask.numberOfRectangles;
     }
 
     @Override
@@ -334,6 +335,16 @@
     }
 
     @Override
+    public void setX(int x) {
+        if (rfb != null) rfb.setX(x);
+    }
+
+    @Override
+    public void setY(int y) {
+        if (rfb != null) rfb.setY(y);
+    }
+
+    @Override
     public void setTight(boolean isTight) {
         this.isTight = isTight;
     }