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.
Lukas Vrabec [Mon, 25 May 2020 09:29:44 +0000 (11:29 +0200)]
[SELinux] Allow vnc session create ~/.vnc
Allow vnc session labeled with SELinux vnc_session_t domain to create
directory in user homedir ~/.vnc labeled with SELinux label xdm_home_t.
Because also process vncpasswd creates ~/.vnc directory, file transition that
userdomain attribute SELinux domain (label for the process) can create the
directory with the same label needs to be added.
Mark Mielke [Wed, 29 Jul 2020 04:26:41 +0000 (00:26 -0400)]
vncserver: Display check should confirm UNIX domain socket is still valid
If the X server is not shut down cleanly, it can leave UNIX domain
sockets around that "vncserver" has previously mis-identified as
evidence that the display number is still in use.
Instead of checking for existence of /tmp/.X11-unix/X<n>, the code
will now attempt to connect to the socket to confirm that there is a
server process listening on this UNIX domain socket. This will
eliminate false positives in the case the UNIX domain socket still
exists but is not associated with a listening Xorg server. The Xorg
server does not have a problem with fixing this file when it next
starts up. It is only important to avoid using the port if it is still
in use.
Mark Mielke [Wed, 29 Jul 2020 04:21:19 +0000 (00:21 -0400)]
vncserver: Display check should be re-factored for Perl 5
The display check and related setup code was complex due to
compatibility with Perl 4. This included different ways of obtaining
system constants and building system data structures. Perl 5 provides
direct constants and utility methods to abstract this out of the
vncserver code.