diff options
-rw-r--r-- | java/com/tigervnc/vncviewer/CConn.java | 8 |
1 files 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(); } |