Mercurial > hg > Applications > TreeVNC
changeset 472:126b84644ca7
fix setVisiblity on node failure
author | mir3636 |
---|---|
date | Thu, 04 Aug 2016 17:50:52 +0900 |
parents | c1b4befc5933 |
children | 37b1e8cbc6bb |
files | src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Wed Aug 03 20:58:36 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Thu Aug 04 17:50:52 2016 +0900 @@ -185,7 +185,7 @@ presenter.successfulRfbConnection(); if (myRfb.hasViewer()) { // hide VNC server's view to prevent video feed back. - boolean visibility = presenter.getReconnectingId() != myRfb.getId(); + boolean visibility = (myRfb.getSharingId() != myRfb.getId()); viewerWindow.setVisible(visibility); if (previousViewerWindow != null) previousViewerWindow.setVisible(false);
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Wed Aug 03 20:58:36 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Thu Aug 04 17:50:52 2016 +0900 @@ -191,9 +191,10 @@ if(viewer.getRfb().isTreeManager() || viewer.getCuiVersion()) { frame.setVisible(false); viewer.setCuiVersion(false); - } else - frame.setVisible(true); - //frame.setVisible(false); + } else { + TreeRFBProto myRfb = viewer.getRfb(); + frame.setVisible(myRfb.getSharingId() != myRfb.getId()); + } frame.validate(); } else { appletWindow.setLayout(new BorderLayout(0, 0));