This commit changes the color of the edges of the dot cursor in the Java
version of vncviewer from fully transparent to white, bringing it in
line with the C++ native version.
Pierre Ossman [Mon, 4 Jul 2022 12:42:55 +0000 (14:42 +0200)]
Store artifacts from Github actions
Might be useful for testing in some cases. Note that the Windows and
Linux binaries will depend on libraries from the build environment. So
the user will need to match those manually.
Pierre Ossman [Tue, 5 Jul 2022 07:19:07 +0000 (09:19 +0200)]
Fix Xvnc dependency list (again)
The previous commit was incorrect in that it overrides automake's
dependency list, rather than adding to it. So we need to make sure
things are duplicated between Xvnc_DEPENDENCIES and Xvnc_LDADD as
appropriate.
Use the same approach as the Xorg binary to keep things familiar.
Pierre Ossman [Mon, 4 Jul 2022 11:59:42 +0000 (13:59 +0200)]
Add missing dependencies for Xvnc
These aren't crucial for a clean build, but must be set for Xvnc to be
properly rebuilt if anything in the Xorg tree changes. automake doesn't
properly deduce these automatically from Xvnc_LDADD, unfortunately.
Pierre Ossman [Tue, 28 Jun 2022 12:49:40 +0000 (14:49 +0200)]
Safely discard large (extended) clipboard contents
Avoid having to buffer everything we want to discard, and instead do it
piece by piece. This is more efficient, and avoids hitting any limits on
the buffering.
Note that this is safe here because we already know we have all the
compressed data. It would not be safe for a general input stream.
Pierre Ossman [Tue, 28 Jun 2022 12:47:39 +0000 (14:47 +0200)]
Properly restore cork state when changed
These streams both need to change the corking state temporarily, but it
is important it is restored to the previous state or things might get
messed up.
For the zlib stream it would just leave things uncorked, which still
works but is less efficient.
But for the TLS stream it might make things very unresponsive as the
corking might be left on permanently, delaying packets indefinitely.
Martins Mozeiko [Tue, 7 Jun 2022 07:37:54 +0000 (00:37 -0700)]
Workaround for MFT cropping in H264 decoding
It seems MFT h264 decoder does not support frame cropping. Which
means that if frame width or height is not multiple of 16 then
decoded output can potentially be used with wrong offset. This
code adds explicit parsing of SPS to extract cropping information
to use, and will apply cropping if reported size differs from
expected.
Pierre Ossman [Sat, 4 Jun 2022 12:19:07 +0000 (14:19 +0200)]
Add target_link_directory() compat function
We need this function to deal with pkgconfig files properly, but
unfortunately it doesn't exist until CMake 3.13, and we need to support
CMake 3.10. So add a hacky compatibility function for older systems.
Pierre Ossman [Wed, 6 Apr 2022 13:45:36 +0000 (15:45 +0200)]
Ignore socket whilst processing data
FLTK has a lot of synchronous stuff (like dialogs), which mean that the
main loop might be run recursively in some cases. If there is data
available on our socket then CConn::socketEvent() will be called
constantly in a busy loop.
Avoid this by removing socket notifications whilst we are processing
data.
Pierre Ossman [Wed, 6 Apr 2022 13:38:45 +0000 (15:38 +0200)]
Enable stream sanity checks in debug builds
Enable this automatically for developers so we increase the chance of
these problems getting caught. There is a risk of overhead though so
keep them disabled for release builds.
Pierre Ossman [Wed, 6 Apr 2022 13:23:50 +0000 (15:23 +0200)]
Don't trust GNUTLS_E_AGAIN
Unfortunately this error can be given by GnuTLS even though the
underlying stream still has data available. So stop trusting this value
and keep track of the underlying stream explicitly.
Pierre Ossman [Fri, 11 Mar 2022 07:31:25 +0000 (08:31 +0100)]
Change vncsession startup error message
We need to get to the point of starting the session script before we
consider things a success. So this can fail in many different ways, not
just the daemonization. Adjust the error message to something more
generic to reflect this.
Zdenek Pytela [Mon, 7 Feb 2022 09:45:41 +0000 (10:45 +0100)]
SELinux: use /root/.vnc in file context specification
Instead of HOME_ROOT/.vnc, /root/.vnc should be used
for user root's home to specify default file context
as HOME_ROOT actually means base for home dirs (usually /home).
Pierre Ossman [Tue, 25 Jan 2022 08:56:31 +0000 (09:56 +0100)]
Improve logging around screen resizing
Avoid duplication, and add logging for some more error conditions so
it's possible to see in the logs why a resize has failed or produced
unexpected results.
William Sjöblom [Wed, 19 Jan 2022 09:04:53 +0000 (10:04 +0100)]
Fix session resize after mirroring on Linux vncviewer
If monitor mirroring was enabled while in a session with vncviewer
running on Linux, the session would not be properly resized on the
server. This was a consequence of only looking at the size and
coordinates of each screen when matching against existing screens after
the screen layout was changed, when in fact we have two (or more)
monitors with the same coordinates and size (but differing ids). This
led to the same monitor being added twice to the layout which would
later fail layout validation, resulting in no resize request being sent
to the server.
When matching, we now also check if the existing screen is not already
present in the layout before considering it a match.
Pierre Ossman [Tue, 18 Jan 2022 12:38:41 +0000 (13:38 +0100)]
Fix handling of VMware cursors
This is a regression from ad0f061. If a VMware cursor rect was split up
over multiple read()s then the stream would become corrupted as we set
the restore point at the wrong place.
Pierre Ossman [Wed, 12 Jan 2022 16:44:20 +0000 (17:44 +0100)]
Improve full-screen workaround on connect
If we've explicitly requested a position (using -geometry) then we were
still triggering legacy full-screen request logic. This is very counter
intuitive as having a position that doesn't align with a monitor should
disqualify us for that.
It turns out that at least marco (and probably everything
metacity-derived) ends up ignoring the requested position and we go back
to triggering the legacy logic again.
Work around this by assuming that the window manager will adjust our
initial position and don't consider that in the workaround logic.
Samuel Mannehed [Fri, 7 Jan 2022 17:46:17 +0000 (18:46 +0100)]
Update MonitorArrangement widget after change
If the options dialog was open when a screen configuration happened the
widget could get out of sync from the settings. A scenario when this
happened was:
1) 3 monitors, fullscreen selected on the two right-most screens
2) disconnect the left-most screen (the one not selected)
In this case, using GNOME, vncviewer would appear in fullscreen on the
right of the two remaining monitors, but the widget would show both
monitors selected. The reason was that the MonitorArragement index
doesn't work the same way as FLTK's screen index.
It's debatable how vncviewer should behave here, but the GUI should at
least match the actual setting.
Pierre Ossman [Thu, 30 Dec 2021 12:03:46 +0000 (13:03 +0100)]
Don't move window in full-screen workaround
If this is done before the window is shown then it can accidentally
override the window manager's placement of the window. Reducing the size
should be sufficient to avoid trigger a full-screen request.
Pierre Ossman [Thu, 30 Dec 2021 09:20:13 +0000 (10:20 +0100)]
Be consistent in including config.h
The generally recommended way is to include it from source files, not
headers. We had a mix of both. Let's try to be consistent and follow the
recommended way.
Pierre Ossman [Thu, 30 Dec 2021 09:16:45 +0000 (10:16 +0100)]
Only restore level if it is wrong
Tweak the workaround from 9023a2e so that it only triggers if there
actually is a problem to fix. This is important since changing levels
also has the side effect of raising the window to the top of the level.
Pierre Ossman [Mon, 27 Dec 2021 11:29:59 +0000 (12:29 +0100)]
Relicense MonitorArrangement widget
This was designed as a general FLTK widget and we want to encourage
others to use it and improve it. So relicense these particular files in
a way that allows it to be used by anyone using FLTK.
As part of this we need to stop using other parts of TigerVNC as that
code is still covered by the GPL.
Pierre Ossman [Thu, 23 Dec 2021 14:58:00 +0000 (15:58 +0100)]
Fix typo in mirror monitor detection
Bug introduced in fb561eb but still somehow passed manual testing.
Resulted in some stray reads off the end of the stack, which were
hopefully harmless.
Pierre Ossman [Fri, 10 Dec 2021 09:05:25 +0000 (10:05 +0100)]
Simplify screen settings
Try to focus on the commonly used settings here in order to keep things
understandable. The uncommon settings will need to be specified as
command line arguments instead.
William Sjöblom [Wed, 24 Nov 2021 11:55:44 +0000 (12:55 +0100)]
Be consistent in "full screen" and "full-screen" use
Previously, there were a number of inconsistencies in the use of
"full-screen" and "full screen" in logs, documentation, and user
interfaces. The consensus seems to be that "full screen" is correct when
used as a noun while "full-screen" is correct when used as an
adjective. These inconsistencies have now been adjusted to follow
consensus.