Mercurial > hg > Applications > TreeVNC
changeset 149:1291cf1122ca
panel will not open ...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 13 Jun 2014 10:48:07 +0900 |
parents | 8d01028906c4 |
children | 925fb2090282 |
files | src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncProtocol.java src/viewer_swing/java/com/glavsoft/viewer/Viewer.java |
diffstat | 3 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java Fri Jun 13 10:09:11 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/CreateConnectionParam.java Fri Jun 13 10:48:07 2014 +0900 @@ -13,6 +13,7 @@ private int portNumber = ConnectionParams.DEFAULT_VNC_ROOT; private MyRfbProto rfb; private String myHostName; + private Thread accThread; public CreateConnectionParam(MyRfbProto rfb) { this.rfb = rfb; @@ -44,7 +45,7 @@ public void runAcceptThread() { rfb.selectPort(ConnectionParams.DEFAULT_VNC_ROOT); AcceptThread acceptThread = new AcceptThread(rfb, rfb.getAcceptPort()); - Thread accThread = new Thread(acceptThread); + accThread = new Thread(acceptThread); accThread.start(); } @@ -67,4 +68,8 @@ public String getMyHostName() { return myHostName; } + + public Thread getAcceptThread() { + return accThread; + } }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncProtocol.java Fri Jun 13 10:09:11 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/TreeVncProtocol.java Fri Jun 13 10:48:07 2014 +0900 @@ -130,7 +130,8 @@ client.setTeminationType(true); client.closeApp(); client.setSocket(socket); - client.run(); + SwingUtilities.invokeLater(client); + // client.run(); }
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Fri Jun 13 10:09:11 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Fri Jun 13 10:48:07 2014 +0900 @@ -298,7 +298,12 @@ settings.setViewOnly(true); // too avoid unnecessary upward traffic cp.createConnectionParam(this); rfb.setViewer(this); - SwingUtilities.invokeLater(this); + // SwingUtilities.invokeLater(this); + try { + Thread thr = cp.getAcceptThread(); + thr.join(); + } catch (InterruptedException e) { + } } /**