Mercurial > hg > Applications > tvnjviewer
changeset 23:0d3cf24fe634
need refactor
author | sugi |
---|---|
date | Sat, 08 Nov 2014 16:45:29 +0900 |
parents | 45176f732171 |
children | 94b36ee816ef |
files | src/main/java/com/glavsoft/rfb/protocol/state/InitState.java |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/state/InitState.java Sat Nov 08 15:46:31 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/state/InitState.java Sat Nov 08 16:45:29 2014 +0900 @@ -32,7 +32,9 @@ import com.glavsoft.exceptions.TransportException; import com.glavsoft.exceptions.UnsupportedProtocolVersionException; import com.glavsoft.exceptions.UnsupportedSecurityTypeException; +import com.glavsoft.rfb.encoding.EncodingType; import com.glavsoft.rfb.encoding.ServerInitMessage; +import com.glavsoft.rfb.encoding.decoder.AliceVNCMessage; import com.glavsoft.rfb.protocol.ProtocolContext; import com.glavsoft.rfb.protocol.ProtocolSettings; @@ -80,8 +82,18 @@ } protected void completeContextData(ServerInitMessage serverInitMessage) { - ReceiveData rData = new ReceiveData(serverInitMessage, false, false); + AliceVNCMessage mes = new AliceVNCMessage(); + mes.setServerInitMessage(serverInitMessage); + ReceiveData rData = new ReceiveData(mes, false, false); DataSegment.getLocal().put("ServerInitMessage", rData, null); + + rData = new ReceiveData(mes, false, false); + mes.encodingTypeId = EncodingType.DESKTOP_SIZE.getId(); + DataSegment.getLocal().put("aliceVNCMessage", rData, null); + + rData = new ReceiveData("dummy", false, false); + DataSegment.getLocal().put("pixelByteArray", rData, null); + context.setPixelFormat(serverInitMessage.getPixelFormat()); context.setFbWidth(serverInitMessage.getFrameBufferWidth()); context.setFbHeight(serverInitMessage.getFrameBufferHeight());