From: Brian P. Hinz Date: Thu, 20 Aug 2015 04:26:28 +0000 (-0400) Subject: Fix desktopSize parameter issue X-Git-Tag: v1.5.90~47^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3c7eb5b594bd0eee8174415fdaa0cef29e4aef2f;p=tigervnc.git Fix desktopSize parameter issue desktopSize preference was being applied even if the checkbox was unselected in the dialog is a value had previously been stored in the preferences file. --- diff --git a/java/com/tigervnc/vncviewer/CConn.java b/java/com/tigervnc/vncviewer/CConn.java index 5ce1c2f7..71bd0901 100644 --- a/java/com/tigervnc/vncviewer/CConn.java +++ b/java/com/tigervnc/vncviewer/CConn.java @@ -1208,11 +1208,9 @@ public class CConn extends CConnection implements Security.DisableSecType(Security.secTypeX509Ident); } } - if (options.desktopSize.isSelected()) { - String desktopSize = - options.desktopWidth.getText() + "x" + options.desktopHeight.getText(); - viewer.desktopSize.setParam(desktopSize); - } + String desktopSize = (options.desktopSize.isSelected()) ? + options.desktopWidth.getText() + "x" + options.desktopHeight.getText() : ""; + viewer.desktopSize.setParam(desktopSize); if (options.fullScreen.isSelected() ^ fullScreen) toggleFullScreen(); }