From 3c7eb5b594bd0eee8174415fdaa0cef29e4aef2f Mon Sep 17 00:00:00 2001 From: "Brian P. Hinz" Date: Thu, 20 Aug 2015 00:26:28 -0400 Subject: [PATCH] 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. --- java/com/tigervnc/vncviewer/CConn.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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(); } -- 2.39.5