Mercurial > hg > Applications > AliceVNC
changeset 33:6f5986d8ecd5
prevent video feedback
author | sugi |
---|---|
date | Sun, 09 Nov 2014 17:33:43 +0900 |
parents | 7d65ad341cc9 |
children | aace9df1462e |
files | build.gradle src/main/java/jp/ac/u_ryukyu/alicevnc/CreateWindow.java src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java src/main/java/jp/ac/u_ryukyu/alicevnc/RenderAndControllerHolder.java |
diffstat | 4 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/build.gradle Sun Nov 09 11:40:40 2014 +0900 +++ b/build.gradle Sun Nov 09 17:33:43 2014 +0900 @@ -8,13 +8,13 @@ repositories { maven(){ - url 'http://www.cr.ie.u-ryukyu.ac.jp/hg/maven/raw-file/0a98e8eb560b/' + url 'http://www.cr.ie.u-ryukyu.ac.jp/hg/maven/raw-file/8991fa20f32f/' } } dependencies { - //compile 'com.glavsoft.viewer:tightvnc-jviewer:2.7.2' - //compile group: 'cr.ie.u_ryukyu.ac.jp', name: 'Alice', version: '1.0', ext: 'jar' + compile 'com.glavsoft.viewer:tightvnc-jviewer:2.7.2' + compile group: 'cr.ie.u_ryukyu.ac.jp', name: 'Alice', version: '1.0', ext: 'jar' } jar {
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/CreateWindow.java Sun Nov 09 11:40:40 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/CreateWindow.java Sun Nov 09 17:33:43 2014 +0900 @@ -59,7 +59,7 @@ settings.setViewOnly(true); IRepaintController repaintController = viewerWindow.getSurface(); Renderer renderer = repaintController.createRenderer(null, width, height, context.getPixelFormat()); - RenderAndControllerHolder holder = new RenderAndControllerHolder(renderer, repaintController); + RenderAndControllerHolder holder = new RenderAndControllerHolder(renderer, repaintController, viewerWindow); ods.put("holder", holder); new ReceiveUpdateRectangle();
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java Sun Nov 09 11:40:40 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java Sun Nov 09 17:33:43 2014 +0900 @@ -65,7 +65,11 @@ holder.getRepaintController().createRenderer(null, message.width, message.height, message.getPixelFormat()) ); - + boolean visible = true; + if ("local".equals(info2.from)) { + visible = false; + } + holder.getViewerWindow().setVisible(visible); } else if (message.getEncodingType() == EncodingType.RICH_CURSOR) { byte[] buf = info2.asClass(byte[].class); RichCursorDecoder.getInstance().decode(holder.getRenderer(), message, buf);
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/RenderAndControllerHolder.java Sun Nov 09 11:40:40 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/RenderAndControllerHolder.java Sun Nov 09 17:33:43 2014 +0900 @@ -2,16 +2,20 @@ import com.glavsoft.drawing.Renderer; import com.glavsoft.rfb.IRepaintController; +import com.glavsoft.viewer.swing.SwingViewerWindow; public class RenderAndControllerHolder { private Renderer renderer; private IRepaintController repaintController; + private SwingViewerWindow viewerWindow; public RenderAndControllerHolder(Renderer renderer, - IRepaintController repaintController) { + IRepaintController repaintController, + SwingViewerWindow viewerWindow) { this.repaintController = repaintController; this.renderer = renderer; + this.viewerWindow = viewerWindow; } public Renderer getRenderer() { @@ -26,4 +30,8 @@ return repaintController; } + public SwingViewerWindow getViewerWindow(){ + return viewerWindow; + } + }