From 99a855a20743484576a1d3e2e1cbd9d0e19aa4c6 Mon Sep 17 00:00:00 2001 From: "Brian P. Hinz" Date: Thu, 9 Feb 2017 23:41:56 -0500 Subject: Fix regression that omitted support for client redirect. Also, delay showing DesktopWindow until first valid rect has been recieved. This allows for a ClientRedirect to take place before any data rects have been received. --- java/com/tigervnc/rfb/CMsgReader.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'java/com/tigervnc/rfb/CMsgReader.java') diff --git a/java/com/tigervnc/rfb/CMsgReader.java b/java/com/tigervnc/rfb/CMsgReader.java index e7b4deb8..e9cad89d 100644 --- a/java/com/tigervnc/rfb/CMsgReader.java +++ b/java/com/tigervnc/rfb/CMsgReader.java @@ -104,6 +104,10 @@ public class CMsgReader { case Encodings.pseudoEncodingExtendedDesktopSize: readExtendedDesktopSize(x, y, w, h); break; + case Encodings.pseudoEncodingClientRedirect: + nUpdateRectsLeft = 0; + readClientRedirect(x, y, w, h); + return; default: readRect(new Rect(x, y, x+w, y+h), encoding); break; @@ -259,6 +263,18 @@ public class CMsgReader { handler.setExtendedDesktopSize(x, y, w, h, layout); } + protected void readClientRedirect(int x, int y, int w, int h) + { + int port = is.readU16(); + String host = is.readString(); + String x509subject = is.readString(); + + if (x != 0 || y != 0 || w != 0 || h != 0) + vlog.error("Ignoring ClientRedirect rect with non-zero position/size"); + else + handler.clientRedirect(port, host, x509subject); + } + public int[] getImageBuf(int required) { return getImageBuf(required, 0, 0); } public int[] getImageBuf(int required, int requested, int nPixels) -- cgit v1.2.3