diff options
author | Brian Hinz <bphinz@users.sourceforge.net> | 2013-01-23 22:46:53 +0000 |
---|---|---|
committer | Brian Hinz <bphinz@users.sourceforge.net> | 2013-01-23 22:46:53 +0000 |
commit | d39531edfe58343cefc29ab495462f1005edf2c5 (patch) | |
tree | 7719143d0eb79766be7f3546a79ea069ba723a93 /java/com/tigervnc/vncviewer/Viewport.java | |
parent | 09b8385146b7e6e1ae3a7df7b9883a25f5c03b13 (diff) | |
download | tigervnc-d39531edfe58343cefc29ab495462f1005edf2c5.tar.gz tigervnc-d39531edfe58343cefc29ab495462f1005edf2c5.zip |
Fixes a number of issues related to fullscreen mode. When switching out of fullscreen mode via the options dialog, setFullScreenWindow was being applied to the old reference, causing the whole screen to be blanked and unresponsive. The checkmark in the F8 menu could sometimes get out of sync with the state of the option. Cursor wasn't always being re-scaled when scale factor was changed. It seems that setCursor can still sometimes be passed a null pointer for the hotspot, so add back in a check that was removed in r5025
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5034 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/com/tigervnc/vncviewer/Viewport.java')
-rw-r--r-- | java/com/tigervnc/vncviewer/Viewport.java | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/java/com/tigervnc/vncviewer/Viewport.java b/java/com/tigervnc/vncviewer/Viewport.java index 95489fac..bc19b642 100644 --- a/java/com/tigervnc/vncviewer/Viewport.java +++ b/java/com/tigervnc/vncviewer/Viewport.java @@ -62,10 +62,6 @@ public class Viewport extends JFrame }); addComponentListener(new ComponentAdapter() { public void componentResized(ComponentEvent e) { - if ((getExtendedState() != JFrame.MAXIMIZED_BOTH) && - cc.fullScreen) { - cc.toggleFullScreen(); - } String scaleString = cc.viewer.scalingFactor.getValue(); if (scaleString.equalsIgnoreCase("Auto") || scaleString.equalsIgnoreCase("FixedRatio")) { @@ -78,22 +74,23 @@ public class Viewport extends JFrame cc.desktop.scaledHeight)); sp.validate(); if (getExtendedState() != JFrame.MAXIMIZED_BOTH && - scaleString.equalsIgnoreCase("FixedRatio")) { + scaleString.equalsIgnoreCase("FixedRatio") && + !cc.fullScreen) { 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, - cursor.data, cursor.mask); - } } } else { int policy = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED; sp.setHorizontalScrollBarPolicy(policy); sp.validate(); } + if (cc.desktop.cursor != null) { + Cursor cursor = cc.desktop.cursor; + cc.setCursor(cursor.width(),cursor.height(),cursor.hotspot, + cursor.data, cursor.mask); + } } }); } |