diff options
author | Brian Hinz <bphinz@users.sourceforge.net> | 2011-10-12 20:51:05 +0000 |
---|---|---|
committer | Brian Hinz <bphinz@users.sourceforge.net> | 2011-10-12 20:51:05 +0000 |
commit | 552f3db5f5bf2a4e3af28edad741395e1681e575 (patch) | |
tree | 9809ae85f4c8c6f7cdd378c7fa62891f3159d4b2 /java/com/tigervnc/vncviewer/CConn.java | |
parent | 4426f00f07daeae0361dcb13b21474128f98d872 (diff) | |
download | tigervnc-552f3db5f5bf2a4e3af28edad741395e1681e575.tar.gz tigervnc-552f3db5f5bf2a4e3af28edad741395e1681e575.zip |
Revert a change from yesterday that broke the viewer (setAccelerationPriority). Fix some more issues with window sizing and scaling. Trying to eliminate unnecessary synchronization.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4725 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/com/tigervnc/vncviewer/CConn.java')
-rw-r--r-- | java/com/tigervnc/vncviewer/CConn.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/com/tigervnc/vncviewer/CConn.java b/java/com/tigervnc/vncviewer/CConn.java index 089d241a..a485f339 100644 --- a/java/com/tigervnc/vncviewer/CConn.java +++ b/java/com/tigervnc/vncviewer/CConn.java @@ -85,8 +85,12 @@ class ViewportFrame extends JFrame sp.setSize(new Dimension(cc.desktop.scaledWidth, cc.desktop.scaledHeight)); sp.validate(); - if (getExtendedState() != JFrame.MAXIMIZED_BOTH) - pack(); + if (getExtendedState() != JFrame.MAXIMIZED_BOTH && + scaleString.equals("FixedRatio")) { + int w = cc.desktop.scaledWidth + getInsets().left + getInsets().right; + int h = cc.desktop.scaledHeight + getInsets().top + getInsets().bottom; + setSize(w, h); + } if (cc.desktop.cursor != null) { Cursor cursor = cc.desktop.cursor; cc.setCursor(cursor.width(),cursor.height(),cursor.hotspot, @@ -512,7 +516,7 @@ public class CConn extends CConnection pack = false; } - if (!pack) + if (pack) viewport.setPreferredSize(new Dimension(w,h)); if (viewport.getExtendedState() == JFrame.MAXIMIZED_BOTH) { |