]> source.dussan.org Git - tigervnc.git/commitdiff
Fix desktopSize parameter issue
authorBrian P. Hinz <bphinz@users.sf.net>
Thu, 20 Aug 2015 04:26:28 +0000 (00:26 -0400)
committerBrian P. Hinz <bphinz@users.sf.net>
Thu, 20 Aug 2015 04:26:28 +0000 (00:26 -0400)
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

index 5ce1c2f709db6c7b352aae2b868200dd90e26dfd..71bd090166338a1177d65cc9c484529a7b6afb03 100644 (file)
@@ -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();
   }