Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 476:9a672958d7f2
Set sharing ID if TreeManager sharing
author | one |
---|---|
date | Thu, 07 Sep 2017 19:50:37 +0900 |
parents | b26c934c2bfb |
children | 6f4331a846bf |
files | .idea/gradle.xml .idea/misc.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 | 5 files changed, 77 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/.idea/gradle.xml Fri Jul 28 19:48:02 2017 +0900 +++ b/.idea/gradle.xml Thu Sep 07 19:50:37 2017 +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/.idea/misc.xml Fri Jul 28 19:48:02 2017 +0900 +++ b/.idea/misc.xml Thu Sep 07 19:50:37 2017 +0900 @@ -3,6 +3,13 @@ <component name="EntryPointsManager"> <entry_points version="2.0" /> </component> + <component name="MavenImportPreferences"> + <option name="generalSettings"> + <MavenGeneralSettings> + <option name="mavenHome" value="Bundled (Maven 3)" /> + </MavenGeneralSettings> + </option> + </component> <component name="ProjectLevelVcsManager" settingsEditedManually="false"> <OptionsSetting value="true" id="Add" /> <OptionsSetting value="true" id="Remove" /> @@ -13,7 +20,57 @@ <ConfirmationsSetting value="0" id="Add" /> <ConfirmationsSetting value="0" id="Remove" /> </component> - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/build/classes" /> </component> + <component name="masterDetails"> + <states> + <state key="GlobalLibrariesConfigurable.UI"> + <settings> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="JdkListConfigurable.UI"> + <settings> + <last-edited>1.8</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="ProjectJDKs.UI"> + <settings> + <last-edited>1.8 (1)</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="ProjectLibrariesConfigurable.UI"> + <settings> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + </states> + </component> </project> \ No newline at end of file
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Fri Jul 28 19:48:02 2017 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Thu Sep 07 19:50:37 2017 +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 Fri Jul 28 19:48:02 2017 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Thu Sep 07 19:50:37 2017 +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 Fri Jul 28 19:48:02 2017 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Thu Sep 07 19:50:37 2017 +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();