diff options
author | Brian P. Hinz <bphinz@users.sf.net> | 2017-02-09 23:41:56 -0500 |
---|---|---|
committer | Brian P. Hinz <bphinz@users.sf.net> | 2017-02-10 18:31:14 -0500 |
commit | 99a855a20743484576a1d3e2e1cbd9d0e19aa4c6 (patch) | |
tree | 965f9d7ff520cbfaaba95190fbe4352b6e00c637 /java/com/tigervnc/vncviewer/DesktopWindow.java | |
parent | 455566e8b5b2ea5bd78350769eb2d62279cc0dc6 (diff) | |
download | tigervnc-99a855a20743484576a1d3e2e1cbd9d0e19aa4c6.tar.gz tigervnc-99a855a20743484576a1d3e2e1cbd9d0e19aa4c6.zip |
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.
Diffstat (limited to 'java/com/tigervnc/vncviewer/DesktopWindow.java')
-rw-r--r-- | java/com/tigervnc/vncviewer/DesktopWindow.java | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/java/com/tigervnc/vncviewer/DesktopWindow.java b/java/com/tigervnc/vncviewer/DesktopWindow.java index e76a0156..187fbad0 100644 --- a/java/com/tigervnc/vncviewer/DesktopWindow.java +++ b/java/com/tigervnc/vncviewer/DesktopWindow.java @@ -151,21 +151,6 @@ public class DesktopWindow extends JFrame } }); - pack(); - if (embed.getValue()) { - scroll.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED); - scroll.setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_AS_NEEDED); - VncViewer.setupEmbeddedFrame(scroll); - } else { - if (fullScreen.getValue()) - fullscreen_on(); - else - setVisible(true); - - if (maximize.getValue()) - setExtendedState(JFrame.MAXIMIZED_BOTH); - } - } // Remove resize listener in order to prevent recursion when resizing @@ -227,25 +212,40 @@ public class DesktopWindow extends JFrame setTitle(name); } - // Copy the areas of the framebuffer that have been changed (damaged) - // to the displayed window. - - public void updateWindow() - { - if (firstUpdate) { - if (cc.cp.supportsSetDesktopSize && !desktopSize.getValue().equals("")) { - // Hack: Wait until we're in the proper mode and position until - // resizing things, otherwise we might send the wrong thing. - if (delayedFullscreen) - delayedDesktopSize = true; - else - handleDesktopSize(); - } - firstUpdate = false; - } - - viewport.updateWindow(); - } + // Copy the areas of the framebuffer that have been changed (damaged) + // to the displayed window. + + public void updateWindow() + { + if (firstUpdate) { + pack(); + if (embed.getValue()) { + scroll.setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_AS_NEEDED); + scroll.setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_AS_NEEDED); + VncViewer.setupEmbeddedFrame(scroll); + } else { + if (fullScreen.getValue()) + fullscreen_on(); + else + setVisible(true); + + if (maximize.getValue()) + setExtendedState(JFrame.MAXIMIZED_BOTH); + } + + if (cc.cp.supportsSetDesktopSize && !desktopSize.getValue().equals("")) { + // Hack: Wait until we're in the proper mode and position until + // resizing things, otherwise we might send the wrong thing. + if (delayedFullscreen) + delayedDesktopSize = true; + else + handleDesktopSize(); + } + firstUpdate = false; + } + + viewport.updateWindow(); + } public void resizeFramebuffer(int new_w, int new_h) { |