# HG changeset patch # User oc # Date 1422636339 -32400 # Node ID 345185ef630e8a2458ff5d2e95f0298461dfb9f7 # Parent 9637525e57c8b710d366f6483390d20dda30f48a close viewer as soon as push share screen button. diff -r 9637525e57c8 -r 345185ef630e src/main/java/jp/ac/u_ryukyu/treevnc/TreeRFBProto.java --- 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(); } diff -r 9637525e57c8 -r 345185ef630e src/viewer_swing/java/com/glavsoft/viewer/Viewer.java --- 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(); } diff -r 9637525e57c8 -r 345185ef630e src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java --- 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 rectangles = viewer.getScreenRectangles(); int leftScreenNumber = 0; int singleWidth = (int) rectangles.get(leftScreenNumber).getWidth();