Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 466:8d636adb292c
fix getFbRectangles
author | kono |
---|---|
date | Wed, 13 Jul 2016 15:48:17 +0900 |
parents | 2107b954e285 |
children | fd803266ade7 |
files | src/main/java/com/glavsoft/rfb/client/FramebufferUpdateRequestMessage.java src/viewer_swing/java/com/glavsoft/viewer/FbRectangle.java src/viewer_swing/java/com/glavsoft/viewer/Viewer.java src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java |
diffstat | 4 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/client/FramebufferUpdateRequestMessage.java Wed Jul 13 10:43:39 2016 +0900 +++ b/src/main/java/com/glavsoft/rfb/client/FramebufferUpdateRequestMessage.java Wed Jul 13 15:48:17 2016 +0900 @@ -46,7 +46,7 @@ this.width = width; this.height = height; this.sendFullScreenFlag = fullScreen; - System.out.println(this); + // System.out.println(this); // sendFullScreenRequest(); }
--- a/src/viewer_swing/java/com/glavsoft/viewer/FbRectangle.java Wed Jul 13 10:43:39 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/FbRectangle.java Wed Jul 13 15:48:17 2016 +0900 @@ -50,4 +50,9 @@ public void setScreenNumber(int screenNumber) { this.screenNumber = screenNumber; } + + @Override + public String toString() { + return "FRectangle(x="+x+",y="+y+",xFb="+xfb+",yFb="+yfb+",w="+width+",h="+height+")"; + } }
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Wed Jul 13 10:43:39 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Wed Jul 13 15:48:17 2016 +0900 @@ -504,7 +504,7 @@ for (Rectangle rect : rectangles) { FbRectangle fbrect = new FbRectangle(rect.x, rect.y, rect.width, rect.height, screenNumber, retinaScale(screenNumber)); fbrect.setXfb(rect.x + offset.x); - fbrect.setXfb(rect.y + offset.y); + fbrect.setYfb(rect.y + offset.y); fbRectangles.add(fbrect); screenNumber++; }
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Wed Jul 13 10:43:39 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Wed Jul 13 15:48:17 2016 +0900 @@ -919,7 +919,8 @@ int x = rectangle1.getXfb(); int y = rectangle1.getYfb(); int scale = rectangle1.getRetinaScale(); - showScreenInfo("request screen change id = " + viewer.getRfb().getId(), 0, x, y, singleWidth, singleHeight, scale); + // System.out.println("request scrren change rectangles = "+rectangle1); + // showScreenInfo("request screen change id = " + viewer.getRfb().getId(), 0, x, y, singleWidth, singleHeight, scale); if (viewer.getRfb().isTreeManager()) { changeVncServer(viewer, x, y, singleWidth * scale, singleHeight * scale, scale, viewer.getRfb().getId()); } @@ -967,13 +968,13 @@ int thatRetinaScale = presenter.getRetinaScale(); final int thatScreenWidth = presenter.getSingleWidth(); final int thatScreenHeight = presenter.getSingleHeight(); - showScreenInfo("that", 0, thatScreenX, thatScreenY, thatScreenWidth, thatScreenHeight, thatRetinaScale); + // showScreenInfo("that", 0, thatScreenX, thatScreenY, thatScreenWidth, thatScreenHeight, thatRetinaScale); System.out.println("that FB w:" + viewer.getRfb().getContext().getFbWidth() + " h:" + viewer.getRfb().getContext().getFbHeight()); frame.setSize(thisScreenWidth, thisScreenHeight); double scale = uiSettings.fitScreen(thisScreenWidth, thisScreenHeight, thatScreenWidth, thatScreenHeight); // final Rectangle visible = new Rectangle((int)(thatScreenX*scale),(int)(thatScreenY*scale),(int)(thatScreenWidth*scale)-1,(int)(thatScreenHeight*scale)-1); - showScreenInfo("this", thisScreenNumber, 0, 0,thisScreenWidth, thisScreenHeight, thisRetinaScale); + // showScreenInfo("this", thisScreenNumber, 0, 0,thisScreenWidth, thisScreenHeight, thisRetinaScale); final int scrollx = (int)(thatScreenX * scale); final int scrolly = (int)(thatScreenY * scale); // System.out.println("thisScrollScale: " + scale + " xmax:"+scroller.getHorizontalScrollBar().getMaximum() + " scrollx:"+scrollx);