Brian Hinz [Sat, 11 Jan 2014 23:30:50 +0000 (23:30 +0000)]
r5142 and r5149 borrowed code from the TurboVNC viewer, which has different Configuration parameter logic. This caused an exception in the usage() method
Brian Hinz [Sat, 11 Jan 2014 23:07:42 +0000 (23:07 +0000)]
r5138 did not completely resolve the problem with clipboard data consuming too much heap space. Large amounts of clipboard data could still cause the heap size to grow to huge sizes. This patch tries to address the problem by opening a Reader to the underlying IO stream and then reading only up to MaxCutText characters. The garbage collector is invoked manually rather than waiting for the JVM to do it in order to prevent the heap size from growing in between JVM invoked garbage collections.
Pierre Ossman [Tue, 7 Jan 2014 15:28:45 +0000 (15:28 +0000)]
Make sure the fill function pointer gets updated if the
managed pixel buffer changes format. Also add a bit more
protection for switching pixel format as the base classes
aren't really designed for that. Fixes a crash with the
mouse pointer in WinVNC.
Based on work done by Daniel Wyatt (dewyatt).
Brian Hinz [Thu, 2 Jan 2014 20:35:52 +0000 (20:35 +0000)]
Release all downKeys when the focus is lost, otherwise the state of the keyboard will be inconsistent when the focus is regained. Also, the direction of the key release was incorrect in r5147.
Brian Hinz [Thu, 2 Jan 2014 01:23:56 +0000 (01:23 +0000)]
Re-introduces embedded applet mode for the java viewer. On Windows and Linux, the embedded applet can be dragged from the browser window and detached from the browser process. The mouse gesture for detaching the applet is ALT+drag on Windows and SHIFT+drag on Linux.
Brian Hinz [Sun, 29 Dec 2013 16:30:32 +0000 (16:30 +0000)]
Another overhaul of the key event handlers. There was a fundamental flaw in the previous implementation due to the fact that java key modifiers associated with a key_pressed or key_released event are reported with respect to each particular event. Thus, for example a key sequence of CTRL press, letter press, CTRL release, letter release never sends the corresponding release for the CTRL+letter down event. Key events are now synchronized on a monitor object to help ensure that the key sequence is preserved. This implementation mirrors the fltk viewer quite closely and, as far as I can tell, is capable of sending all of the same keysyms.
Brian Hinz [Mon, 2 Dec 2013 02:53:10 +0000 (02:53 +0000)]
Added attributes to the Java viewer MANIFEST file in order to conform to upcoming JRE requirements. Added support for specifying a signing certificate in place of the self-signed certificate.
Brian Hinz [Sun, 1 Dec 2013 23:07:07 +0000 (23:07 +0000)]
Copied Lion fullScreen code from TurboVNC viewer. This is a more robust implementation and does not suffer from Java bugs 8009911 or 4783448 like the existing code did. CMakeLists file was also updated to be more similar to the TurboVNC cmake file. This wasn't strictly necessary but it simplifies things a bit.
Brian Hinz [Thu, 28 Nov 2013 16:26:08 +0000 (16:26 +0000)]
Added 'contrib' folder to store patches necessary to build external dependecies, distribution-specific packaging files, etc. Also added a delimiter to the end of the fltk patch script defined in BUILDING.txt to make it easier to parse this script out for automated builds.
Brian Hinz [Sat, 23 Nov 2013 05:05:21 +0000 (05:05 +0000)]
Fixes a condition where too much data on the local clipboard causes the client to exceed the max heap size and exit. Since the server will, by default, discard clipboard transfers greater than 256KB anyway, a parameter was added which sets the default max clipboard size that the client will hold to 256KB also.
Pierre Ossman [Wed, 6 Nov 2013 15:27:04 +0000 (15:27 +0000)]
Some applications probe for clipboard formats using the
trial-and-error method rather than asking for TARGETS. We
need to make sure we properly report unsupported formats
back to these.
Pierre Ossman [Thu, 5 Sep 2013 14:25:40 +0000 (14:25 +0000)]
Printing the clipboard data is very annoying as it could
include line breaks, things with the wrong character encoding
and god knows what. Just print the size of the data instead.
Pierre Ossman [Thu, 30 May 2013 14:50:57 +0000 (14:50 +0000)]
Some applications (e.g. wine and rdesktop) tend to misbehave
when we use fake shift to get different symbols on the numpad.
So avoid using fake shifts on NumLock related keys and hope
that other applications won't get upset by getting the
non-numpad keysym counterparts.
Pierre Ossman [Thu, 23 May 2013 11:42:41 +0000 (11:42 +0000)]
XkbTranslateKeyCode() is not implemented according to
specification in any system I can find, so change our code
to follow reality rather than specification.
Pierre Ossman [Wed, 22 May 2013 11:59:38 +0000 (11:59 +0000)]
Apparently it is more kosher to completely disassociate an
output from its CRTC than just removing the mode when
disabling an output. This is what "xrandr --off" does.
Pierre Ossman [Wed, 22 May 2013 11:47:08 +0000 (11:47 +0000)]
Automatically update the connection state for RandR
outputs in Xvnc as virtual displays become enabled/disabled.
This seems to make applications happier than just
clearing the mode.
Pierre Ossman [Wed, 8 May 2013 11:22:04 +0000 (11:22 +0000)]
VNC needs to be initialised early to get its hooks at a proper
place. The new patch for 1.13+ broke at least animated cursors
by moving VNC further down the init list.
Pierre Ossman [Tue, 9 Apr 2013 15:50:50 +0000 (15:50 +0000)]
Major rewrite of the keyboard code. The old code was too focused on
the old core X11 keyboards. The new code has an abstract common section,
and two different backends for core and XKB. Core keyboards should be
unaffected, but XKB support should be much better with this approach.
Brian Hinz [Mon, 25 Mar 2013 20:58:14 +0000 (20:58 +0000)]
More fixes for key event issues. It seems that on WindowsXP sending the actual key press/release separately can be mis-interpreted by the server as holding the key down. Using a keyTyped event for all character input ensures that we can send an immediate down/up. It also works around the broken AltGr detection in Java 6. Also added support for more keys (F13-F24, etc.). Some key definitions in java don't have X11 equivalents or I could not be sure so I've left them commented out.
Brian Hinz [Wed, 6 Mar 2013 18:14:54 +0000 (18:14 +0000)]
Fixes some regressions introduced in r5056. Losing window focus caused key modifiers to be left in an incorrect state. Special handling of AltGr key was being applied in cases where CTRL_L+ALT_L keys were depressed which also caused the modifiers to be left in an incorrect state. Corrected mapping of CTRL+ALT+SHIFT hotkeys to match F8 menu.
Brian Hinz [Sun, 3 Mar 2013 16:53:41 +0000 (16:53 +0000)]
Backported a number of fixes/enhancements (mostly related to keymapping) from TurboVNC viewer. Also cleaned up some whitespace and minor formatting changes.
Brian Hinz [Fri, 1 Mar 2013 00:29:10 +0000 (00:29 +0000)]
Using DirectColorModel constructor with an alpha mask other than 0 creates a ColorMap with Transparency.TRANSLUCENT rather than OPAQUE. This in turn causes rendering between opaque BufferedImages or to the screen to be performed without HW acceleration.
Brian Hinz [Fri, 22 Feb 2013 19:47:13 +0000 (19:47 +0000)]
comboBoxEdited events are fired if the content of the JComboBox is edited and then the comboBox is de-selected. This causes the connection to be initiated inadvertently sometimes (like when the About... button was pressed. Removed the ItemListener since it didn't serve any purpose, and also deleted the definition of endDialog() since it was the same as the inherited function anyway.
Brian Hinz [Thu, 21 Feb 2013 03:11:14 +0000 (03:11 +0000)]
Fixes yet another case where the viewport background wasn't painted black when the desktop size was less than the viewport size. Also set both scrollbar policies just as a precaution.
Pierre Ossman [Tue, 19 Feb 2013 08:59:03 +0000 (08:59 +0000)]
Modern versions of ImageMagick properly respects the SVG default
DPI of 90, which causes unwanted scaling under ImageMagick's default
72. Force a 72 DPI to get pixel perfect matching.
Brian Hinz [Wed, 23 Jan 2013 22:46:53 +0000 (22:46 +0000)]
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