made full-screen edge scrolling smoother and faster
The old method used a very slow frame rate with small steps,
which made it obnoxious during use. The new method has a few
improvements:
- Calculates "edge" region width automatically, as a ratio of
the viewport size. Default is 1/16th.
- Uses a different edge width for x and y, which works better
on very wide or very tall screens.
- Increased default frame rate from 10 fps to 60 fps.
- Replaced hardcoded frame rate with a #define.
- Reduced maximum movement per frame slightly, because the
frame rate is so much faster. The overall result is still much
faster, but also easier to do small adjustments with.
- Fixed off-by-one error in scroll rate calculation formula. Left/up
scrolls were faster than down/right, but this is fixed.
This makes it more comfortable to use TigerVNC on a small screen
to work on a larger screen for hours at a time.
Pierre Ossman [Thu, 1 Nov 2018 09:19:15 +0000 (10:19 +0100)]
Maintain static screen DPI on resize
Trying to dynamically track the DPI did not really work as we'd
start accumulating errors and eventually the DPI would start to
drift. Instead maintain a fixed, sensible DPI at all times.
lhchavez [Mon, 8 Feb 2021 15:09:10 +0000 (07:09 -0800)]
Support the VMware Cursor Position extension on vncviewer
This change makes it possible for re-synchronizing the remote cursor on
the vncviewer when in fullscreen mode. This is done by locally moving
the cursor position to what the server thinks it should be.
lhchavez [Mon, 8 Feb 2021 00:36:47 +0000 (16:36 -0800)]
Add support for notifying clients about pointer movements
This change adds support for the VMware Mouse Position
pseudo-encoding[1], which is used to notify VNC clients when X11 clients
call `XWarpPointer()`[2]. This function is called by SDL (and other
similar libraries) when they detect that the server does not support
native relative motion, like some RFB clients.
With this, RFB clients can choose to adjust the local cursor position
under certain circumstances to match what the server has set. For
instance, if pointer lock has been enabled on the client's machine and
the cursor is not being drawn locally, the local position of the cursor
is irrelevant, so the RFB client can use what the server sends as the
canonical absolute position of the cursor. This ultimately enables the
possibility of games (especially FPS games) to behave how users expect
(if the clients implement the corresponding change).
Pierre Ossman [Thu, 14 Jan 2021 12:07:56 +0000 (13:07 +0100)]
Fix handling of bad update requests
We computed a safe area if a client gave us a bogus one, but we didn't
actually use it. Fix this properly and make sure we don't pass on bad
coordinates further.
Pierre Ossman [Mon, 4 Jan 2021 12:04:26 +0000 (13:04 +0100)]
Handle unsolicited clipboard transfers
The extended clipboard protocol has the ability for the peer to request
things to be sent automatically, without a request message. Make sure we
honor such settings.
Pierre Ossman [Wed, 9 Dec 2020 14:57:05 +0000 (15:57 +0100)]
Map macOS Eisu key to XK_Eisu_toggle
It's a better match for what the key symbolises, even though it is not
as common on Unix systems. But we want to avoid getting in to tailoring
things for any one specific input method implementation.
Pierre Ossman [Fri, 20 Nov 2020 08:19:07 +0000 (09:19 +0100)]
Only handle Japanese keys when Japanese layout
Some of the virtual key codes for Japanese keys are used for other
things on other layouts, so we need to make sure we only use this look
up table when the layout is indeed set to Japanese.
gsittyz [Sun, 25 Oct 2020 05:34:45 +0000 (14:34 +0900)]
OS X Japanese Keyboard Support
Added OS X JIS Keyboard keys (kVK_JIS_Eisu, kvK_JIS_Kana). The Kana and Eisu keys are used to alter IME behavior, but currently the Kana key produces an unwanted space character and the Eisu key does not work.
Pierre Ossman [Mon, 5 Oct 2020 11:27:52 +0000 (13:27 +0200)]
Return the correct number of consumed UTF-8 bytes
This would mess up most conversions from UTF-8 as the caller wouldn't
know how far to step to get to the next valid character, resulting in
markers for invalid data to be injected here and there.
Also add some unit tests to avoid this reoccurring.
Pierre Ossman [Fri, 18 Sep 2020 08:44:32 +0000 (10:44 +0200)]
Tolerate specifying -BoolParam 0 and similar
This is needed by vncserver which doesn't know which parameters are
boolean, and it cannot use the -Param=Value form as that isn't tolerated
by the Xorg code.
Brian P. Hinz [Tue, 8 Sep 2020 08:13:32 +0000 (10:13 +0200)]
Properly store certificate exceptions in Java viewer
Like the native viewer, the Java viewer didn't store certificate
exceptions properly. Whilst not as bad as the native viewer, it still
failed to check that a stored certificate wouldn't be maliciously used
for another server. In practice this can in most cases be used to
impersonate another server.
Handle this like the native viewer by storing exceptions for a specific
hostname/certificate combination.
Pierre Ossman [Fri, 21 Aug 2020 13:52:45 +0000 (15:52 +0200)]
Call correct wrappers for clipboard handling
We incorrectly called the underlying functions instead of the safe
wrappers for the new clipboard functions. This had the effect of a)
crashing the entire server if one of these functions failed, and b) not
respecting the settings disabling the clipboard.
Danny Park [Wed, 17 Jun 2020 19:55:02 +0000 (15:55 -0400)]
Update build system so it will compile on Windows 10.
With this commit, TigerVNC will compile for Windows using MSYS2, MinGW-w64 and Inno Setup 6. The resulting binaries have some dll dependencies (even with BUILD_STATIC). The required dll dependencies are not included in the installer.
Unfortunately, the latest version of MSYS2 and MinGW-w64 do not produce a working executable for Windows 7.
Pierre Ossman [Mon, 17 Aug 2020 14:07:03 +0000 (16:07 +0200)]
Comment on SELinux rule affect other commands
This line affects every command run by the user, unlike everything else
in our policy which is just for vncserver/vncsession. It's easy to miss
this so add a comment pointing it out.