Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 479:8f5a2d152c38
merge
author | oshiro |
---|---|
date | Wed, 28 Nov 2018 19:05:58 +0900 |
parents | 8cee5a014d32 |
children | 06984dedd454 |
files | .idea/gradle.xml src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java |
diffstat | 4 files changed, 19 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/.idea/gradle.xml Wed Nov 28 19:00:59 2018 +0900 +++ b/.idea/gradle.xml Wed Nov 28 19:05:58 2018 +0900 @@ -3,7 +3,7 @@ <component name="GradleSettings"> <option name="linkedExternalProjectsSettings"> <GradleProjectSettings> - <option name="distributionType" value="WRAPPED" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="gradleHome" value="/usr/local/share/gradle" /> <option name="gradleJvm" value="1.8" />
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Wed Nov 28 19:00:59 2018 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Wed Nov 28 19:05:58 2018 +0900 @@ -99,8 +99,6 @@ cp.setSingleHeight(context.getFbHeight()); } renderer = repaintController.createRenderer(reader, context.getFbWidth(), context.getFbHeight(), context.getPixelFormat()); - repaintController.setVisible(rfb.getId() != rfb.getSharingId()); - System.out.println("ReceiverTask: FB x="+context.getFbWidth() + " y="+context.getFbHeight() + " myId=" + rfb.getId() + " SharingId=" + rfb.getSharingId() + " visible" + (rfb.getId() != rfb.getSharingId())); } if(rfb.isTreeManager()) { fullscreenFbUpdateIncrementalRequest = new FramebufferUpdateRequestMessage(cp.getX(), cp.getY(), cp.getSingleWidth(), cp.getSingleHeight(), false); @@ -310,8 +308,6 @@ renderer = repaintController.createRenderer(reader, rect.width, rect.height, context.getPixelFormat()); } rfb.setSharingId(id); - repaintController.setVisible(id != rfb.getId()); - System.out.println("got INIT_DATA: myID = " + rfb.getId() + " sharingID = " + id); if (rfb.hasViewer()){ setScreenParameter(rect,singleWidth,singleHeight); } @@ -366,7 +362,12 @@ cp.setSingleHeight(singleHeight); rfb.setConnectionPresenter(cp); v.setFitScreen(); - repaintController.setVisible(rfb.getId() != rfb.getSharingId()); + System.out.println("got INIT_DATA: myID = " + rfb.getId() + " sharingID = " + rfb.getSharingId()); + if (rfb.isTreeManager()) { + repaintController.setVisible(-1 != rfb.getSharingId() && rfb.getId() != rfb.getSharingId()); + } else { + repaintController.setVisible(rfb.getId() != rfb.getSharingId()); + } } private void sendFrameBufferUpdateRequest() {
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Wed Nov 28 19:00:59 2018 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Wed Nov 28 19:05:58 2018 +0900 @@ -209,7 +209,7 @@ int singleHeight = buf.getInt(); int port = buf.getInt(); int scale = buf.getInt(); - System.out.println("Root server change request :" + newHostName + " : " + port); + System.out.println("Root server change request :" + newHostName + " : " + port + " id:" + id); changeVNCServer(viewer, newHostName, port, x, y, singleWidth, singleHeight, scale, id, is, os); } else { continue; @@ -901,6 +901,10 @@ } enableChildrenTransmission(); printNetworkInterface(); + System.out.println("newVNCConenction reconnectingId: " + connectionPresenter.getReconnectingId()); + if (isTreeManager()) { + sharingId = connectionPresenter.getReconnectingId(); + } sendDesktopSizeChange(connectionPresenter.getReconnectingId()); }
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Wed Nov 28 19:00:59 2018 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Wed Nov 28 19:05:58 2018 +0900 @@ -184,9 +184,14 @@ if(!myRfb.getCuiVersion()) presenter.successfulRfbConnection(); if (myRfb.hasViewer()) { - // hide VNC server's view to prevent video feed back. + System.out.println("start connection id:" + myRfb.getId() + " sharingId:" +myRfb.getSharingId()); + // hide VNC server's view to prevent video feed back boolean visibility = (myRfb.getSharingId() != myRfb.getId()); - viewerWindow.setVisible(visibility); + if (visibility && myRfb.isTreeManager()) { + viewerWindow.setVisible(myRfb.getSharingId() != -1); + } else { + viewerWindow.setVisible(visibility); + } if (previousViewerWindow != null) previousViewerWindow.setVisible(false); viewerWindow.fitScreen();