Mercurial > hg > Applications > TreeVNC
changeset 322:345185ef630e
close viewer as soon as push share screen button.
author | oc |
---|---|
date | Sat, 31 Jan 2015 01:45:39 +0900 |
parents | 9637525e57c8 |
children | 03ca0cbbdae8 |
files | src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java src/viewer_swing/java/com/glavsoft/viewer/Viewer.java src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java |
diffstat | 3 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Sat Jan 31 00:54:14 2015 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java Sat Jan 31 01:45:39 2015 +0900 @@ -760,12 +760,12 @@ // send single display width to other node. sendSingleDisplaySize(singleWidth, singleHeight); } - // stop reader stop - stopReceiverTask(); reconnectingId = id; vncProxyService.inhelitClients(vncProxyService, hostName); // after connecting VNC server, rfb send SEND_INIT_DATA command and wakes me up if necessary reconnecting = true; + // stop reader stop + stopReceiverTask(); if (reconnectingId!=0) { waitForVNCConnection(); }
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Sat Jan 31 00:54:14 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Sat Jan 31 01:45:39 2015 +0900 @@ -359,9 +359,6 @@ connectionParams.setConnectionParam(hostName, vncport); isApplet = true; this.setNoConnection(false); - if (myRfb.isTreeManager()) { - setVisible(false); - } run(); }
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Sat Jan 31 00:54:14 2015 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Sat Jan 31 01:45:39 2015 +0900 @@ -852,6 +852,7 @@ JButton screenButton = buttonsBar.createButton("share", "Share my screen", new ActionListener() { @Override public void actionPerformed(ActionEvent e) { + viewer.setVisible(false); ArrayList<Rectangle> rectangles = viewer.getScreenRectangles(); int leftScreenNumber = 0; int singleWidth = (int) rectangles.get(leftScreenNumber).getWidth();