]> source.dussan.org Git - tigervnc.git/commitdiff
Fix rendering issue when scrollbars are present. Only set options.{autoScale,fixedRat...
authorBrian Hinz <bphinz@users.sourceforge.net>
Thu, 6 Oct 2011 21:15:55 +0000 (21:15 +0000)
committerBrian Hinz <bphinz@users.sourceforge.net>
Thu, 6 Oct 2011 21:15:55 +0000 (21:15 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4714 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/src/com/tigervnc/vncviewer/DesktopWindow.java
java/src/com/tigervnc/vncviewer/OptionsDialog.java

index 54366155f6866344a9f2f447c7551f8766eeb768..f5acfff19f0fec09d6dc2c3f62432c25ee92a4ad 100644 (file)
@@ -360,11 +360,6 @@ class DesktopWindow extends JPanel implements
     }
   }
 
-  public void repaint() {
-    if (graphics != null)
-      super.update(graphics);
-  }
-
   String oldContents = "";
   
   synchronized public void checkClipboard() {
index 4913fadee8d01c68d7fefaf1ae214c37343bb3e7..9664dc99a2d91b21a4d73f2b3b901995e100951c 100644 (file)
@@ -292,6 +292,9 @@ class OptionsDialog extends Dialog implements
     veryLowColour.setEnabled(!autoSelect.isSelected());
     compressLevel.setEnabled(customCompressLevel.isSelected());
     qualityLevel.setEnabled(noJpeg.isSelected());
+    autoScale = (scalingFactor.getSelectedItem().equals("Auto"));
+    fixedRatioScale = 
+      (scalingFactor.getSelectedItem().equals("Fixed Aspect Ratio"));
     sendLocalUsername.setEnabled(secVeNCrypt.isEnabled()&&
       (secPlain.isSelected()||secIdent.isSelected()));
   }
@@ -337,6 +340,9 @@ class OptionsDialog extends Dialog implements
   public void actionPerformed(ActionEvent e) {
     Object s = e.getSource();
     if (s instanceof JButton && (JButton)s == okButton) {
+      autoScale = (scalingFactor.getSelectedItem().equals("Auto"));
+      fixedRatioScale = 
+        (scalingFactor.getSelectedItem().equals("Fixed Aspect Ratio"));
       ok = true;
       if (cb != null) cb.getOptions();
       endDialog();
@@ -383,14 +389,6 @@ class OptionsDialog extends Dialog implements
       qualityLevel.setEnabled(noJpeg.isSelected());
       defaults.setPref("noJpeg",(noJpeg.isSelected()) ? "on" : "off");
     }
-    if (s instanceof JComboBox && (JComboBox)s == scalingFactor) {
-      autoScale = fixedRatioScale = false;
-      if (scalingFactor.getSelectedItem().equals("Auto")) {
-        autoScale = true;
-      } else if (scalingFactor.getSelectedItem().equals("Fixed Aspect Ratio")) {
-        fixedRatioScale = true;
-      }
-    }
     if (s instanceof JCheckBox && (JCheckBox)s == sendLocalUsername) {
       defaults.setPref("sendLocalUsername",(sendLocalUsername.isSelected()) ? "on" : "off");
     }