Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 341:1d9a4099ad44
change hasParent value.
author | oc |
---|---|
date | Fri, 06 Feb 2015 19:56:02 +0900 |
parents | fd529c51095f |
children | 4c670edf3065 |
files | src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommand.java src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java |
diffstat | 3 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Fri Feb 06 19:19:14 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Fri Feb 06 19:56:02 2015 +0900 @@ -42,7 +42,7 @@ private Inflater inflater = new Inflater(); private Deflater deflater = new Deflater(); ViewerInterface viewer; - private short id = -1; // my tree node id ( = 0 in root ), -1 means no parent + private short id = 0; // my tree node id ( = 0 in root ), -1 means no parent private TreeVncCommandChannelListener acceptThread; private TreeRootFinderListener getCast; private CreateConnectionParam cp;
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommand.java Fri Feb 06 19:19:14 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommand.java Fri Feb 06 19:56:02 2015 +0900 @@ -109,6 +109,10 @@ rfb.setId(id); rfb.setMyAddress(myHostName); rfb.setLeader(leader); + if (rfb.isTreeManager()) { + // markers tree root has a parent on a different network. + rfb.setId((short) -1); + } try { rfb.getViewer().connectToParenet(port, hostname); } catch (IOException e) {
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Fri Feb 06 19:19:14 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Fri Feb 06 19:56:02 2015 +0900 @@ -859,6 +859,10 @@ int singleHeight = (int) rectangles.get(leftScreenNumber).getHeight(); viewer.getRfb().setSingleDisplaySize(singleWidth, singleHeight); if (viewer.getRfb().isTreeManager()) { + if (viewer.getRfb().hasParent()) { + String adr = viewer.getRfb().getMyAddress(); + context.sendMessage(new ScreenChangeRequest(adr, ConnectionParams.DEFAULT_VNC_ROOT, viewer.getRfb().getId(), singleWidth, singleHeight)); + } changeVncServer(viewer, singleWidth, singleHeight, viewer.getRfb().getId()); return; }