]> source.dussan.org Git - tigervnc.git/log
tigervnc.git
4 years agoBe explicit about SVG size when building icons
Pierre Ossman [Thu, 29 Oct 2020 13:41:23 +0000 (14:41 +0100)]
Be explicit about SVG size when building icons

Not sure how this has changed, but ImageMagick is now using the first
-size to also determine how to scale the SVGs, which is not what we
want.

4 years agoGenerate icons with a depth of 8 bits
Pierre Ossman [Thu, 29 Oct 2020 13:40:54 +0000 (14:40 +0100)]
Generate icons with a depth of 8 bits

Anything else is excessive.

4 years agoHigh-resolution app icon for MacOS
Matteo Seclì [Mon, 19 Oct 2020 09:11:16 +0000 (11:11 +0200)]
High-resolution app icon for MacOS

4 years agoMerge branch 'master' of https://github.com/johnmartin-oracle/tigervnc
Pierre Ossman [Tue, 27 Oct 2020 15:22:23 +0000 (16:22 +0100)]
Merge branch 'master' of https://github.com/johnmartin-oracle/tigervnc

4 years agoDocument that vncserver is now a service
Pierre Ossman [Wed, 14 Oct 2020 14:51:34 +0000 (16:51 +0200)]
Document that vncserver is now a service

4 years agoMerge branch 'unicode' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Mon, 5 Oct 2020 14:49:57 +0000 (16:49 +0200)]
Merge branch 'unicode' of https://github.com/CendioOssman/tigervnc

4 years agoCorrectly clear out output UTF-16 buffer 1120/head
Pierre Ossman [Mon, 5 Oct 2020 14:08:28 +0000 (16:08 +0200)]
Correctly clear out output UTF-16 buffer

Each character is more than one byte, so adjust the clearing of the
buffer to reflect that.

4 years agoCorrectly handle invalid UTF-16 code points
Pierre Ossman [Mon, 5 Oct 2020 14:07:27 +0000 (16:07 +0200)]
Correctly handle invalid UTF-16 code points

Some code points are reserved for the UTF-16 coding itself and must not
appear as input data to the algorithm.

4 years agoFix conversion of latin-1 to UTF-8
Pierre Ossman [Mon, 5 Oct 2020 14:05:15 +0000 (16:05 +0200)]
Fix conversion of latin-1 to UTF-8

Signed bug prevented anything not ASCII from being coded correctly.

4 years agoFix UTF-16 encoding/decoding of high code points
Pierre Ossman [Mon, 5 Oct 2020 14:01:55 +0000 (16:01 +0200)]
Fix UTF-16 encoding/decoding of high code points

Everything outside of BMP was handled incorrectly and was coded as
completely different code points.

4 years agoReturn the correct number of consumed UTF-8 bytes
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.

4 years agoFix installation of vncsession.man
Pierre Ossman [Fri, 2 Oct 2020 10:22:51 +0000 (12:22 +0200)]
Fix installation of vncsession.man

It is now dynamically generated, so it will be in the build directory
and not in the source directory.

4 years agoMerge branch 'systemd' of https://github.com/grulja/tigervnc
Pierre Ossman [Fri, 2 Oct 2020 09:36:00 +0000 (11:36 +0200)]
Merge branch 'systemd' of https://github.com/grulja/tigervnc

4 years agoMerge branch 'sysconfdir' of https://github.com/metalefty/tigervnc
Pierre Ossman [Fri, 2 Oct 2020 09:29:04 +0000 (11:29 +0200)]
Merge branch 'sysconfdir' of https://github.com/metalefty/tigervnc

4 years agoUse /run instead of /var/run which is just a symlink 1115/head
Jan Grulich [Tue, 29 Sep 2020 11:37:16 +0000 (13:37 +0200)]
Use /run instead of /var/run which is just a symlink

4 years agoReplace some more hard-coded /etc with sysconfdir 1101/head
Koichiro IWAO [Wed, 23 Sep 2020 02:23:50 +0000 (11:23 +0900)]
Replace some more hard-coded /etc with sysconfdir

4 years agoTolerate specifying -BoolParam 0 and similar
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.

4 years agoDo not assume sysconfdir is always /etc
Koichiro IWAO [Wed, 16 Sep 2020 14:18:29 +0000 (23:18 +0900)]
Do not assume sysconfdir is always /etc

Refer @CMAKE_INSTALL_FULL_SYSCONF@ instead.

4 years agoMerge branch 'tlstofu' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Tue, 8 Sep 2020 12:12:57 +0000 (14:12 +0200)]
Merge branch 'tlstofu' of https://github.com/CendioOssman/tigervnc

4 years agoProperly store certificate exceptions in Java viewer
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.

4 years agoRemove incorrect umask change
Pierre Ossman [Mon, 7 Sep 2020 07:21:12 +0000 (09:21 +0200)]
Remove incorrect umask change

Not sure why this got in there, but it is incorrect as it results in
creating files with too liberal permissions.

4 years ago[java] don't show password field for secTypes that don't use it
Brian P. Hinz [Fri, 4 Sep 2020 23:09:48 +0000 (19:09 -0400)]
[java] don't show password field for secTypes that don't use it

4 years agoMerge pull request #1 from johnmartin-oracle/johnmartin-oracle-patch-1 1084/head
johnmartin-oracle [Fri, 28 Aug 2020 02:30:40 +0000 (22:30 -0400)]
Merge pull request #1 from johnmartin-oracle/johnmartin-oracle-patch-1

Update Surface_X11.cxx

4 years agoUpdate Surface_X11.cxx
johnmartin-oracle [Fri, 28 Aug 2020 02:30:23 +0000 (22:30 -0400)]
Update Surface_X11.cxx

Runtime sellection of ARGB  XImage byte order

4 years agoFix size of 16x16 icon
Pierre Ossman [Mon, 24 Aug 2020 07:40:18 +0000 (09:40 +0200)]
Fix size of 16x16 icon

For some reason it got generated at an incorrect 20x20 size last time.

4 years agoHide base SConnection methods from VNCServerST
Pierre Ossman [Fri, 21 Aug 2020 13:53:59 +0000 (15:53 +0200)]
Hide base SConnection methods from VNCServerST

It should be using the safe wrappers for everything so make sure it
cannot bypass those and call the SConnection methods directly.

4 years agoCall correct wrappers for clipboard handling
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.

4 years agoChange development version to 1.11.80
Pierre Ossman [Wed, 19 Aug 2020 12:02:23 +0000 (14:02 +0200)]
Change development version to 1.11.80

4 years agoUpdate translation template file
Pierre Ossman [Wed, 19 Aug 2020 12:00:45 +0000 (14:00 +0200)]
Update translation template file

4 years agoMerge branch 'master-improve-ComparingUpdateTracker' of https://github.com/MarkMielke...
Pierre Ossman [Wed, 19 Aug 2020 11:49:34 +0000 (13:49 +0200)]
Merge branch 'master-improve-ComparingUpdateTracker' of https://github.com/MarkMielke/tigervnc

4 years agoComment on SELinux rule affect other commands
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.

4 years agoMerge branch 'vnc_home' of https://github.com/wrabcak/tigervnc
Pierre Ossman [Mon, 17 Aug 2020 14:05:58 +0000 (16:05 +0200)]
Merge branch 'vnc_home' of https://github.com/wrabcak/tigervnc

4 years agoMerge branch 'master-fix-vncserver-display-selector' of https://github.com/MarkMielke...
Pierre Ossman [Mon, 17 Aug 2020 13:51:30 +0000 (15:51 +0200)]
Merge branch 'master-fix-vncserver-display-selector' of https://github.com/MarkMielke/tigervnc

4 years agoFree memory from getaddrinfo()
Pierre Ossman [Mon, 17 Aug 2020 12:02:28 +0000 (14:02 +0200)]
Free memory from getaddrinfo()

We handled this in the failure scenario, but not in the vastly more
common successful case.

4 years agoMerge branch 'winvnc' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Mon, 17 Aug 2020 11:54:47 +0000 (13:54 +0200)]
Merge branch 'winvnc' of https://github.com/CendioOssman/tigervnc

4 years agoFix capitalisation of LICENCE.TXT 1064/head
Pierre Ossman [Mon, 17 Aug 2020 11:15:57 +0000 (13:15 +0200)]
Fix capitalisation of LICENCE.TXT

If InnoSetup is run on a case sensitive system then the configuration
files must match what the file is actually called.

4 years agoFixes for Java 11. SocketDescriptor change was a workaround for a previous java probl...
Brian P. Hinz [Sun, 9 Aug 2020 17:08:54 +0000 (13:08 -0400)]
Fixes for Java 11. SocketDescriptor change was a workaround for a previous java problem that no longer seems necessary

4 years ago[SELinux] Allow vnc session create ~/.vnc 1034/head
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.

userdomain attribute contains following SELinux types:
    auditadm_t
    dbadm_t
    guest_t
    logadm_t
    secadm_t
    staff_t
    staff_wine_t
    sysadm_t
    unconfined_t
    user_t
    user_wine_t
    webadm_t
    xguest_t

Signed-off-by: Lukas Vrabec <lvrabec@redhat.com>
4 years agoMerge pull request #1069 from MarkMielke/master-tigervnc-rpm-spec-updates
Samuel Mannehed [Fri, 31 Jul 2020 12:20:56 +0000 (14:20 +0200)]
Merge pull request #1069 from MarkMielke/master-tigervnc-rpm-spec-updates

EL 7 tigervnc.spec updates

4 years agovncserver: Display check should confirm UNIX domain socket is still valid 1066/head
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.

4 years agovncserver: Display check should be re-factored for Perl 5
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.

4 years agovncserver: Display check should confirm lock file is still valid
Mark Mielke [Wed, 29 Jul 2020 04:01:07 +0000 (00:01 -0400)]
vncserver: Display check should confirm lock file is still valid

If the X server is not shut down cleanly, it may leave lock files
around that "vncserver" has previously mis-identified as evidence that
the display number is still in use.

Instead of checking for existence of /tmp/.X<n>-lock, the code will
now extract the PID from the lock file and confirm that a process
exists with the same PID. This will eliminate false positives in the
case that this file references a PID that no longer exists. 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.

4 years agovncserver: Display check should avoid duplicate code
Mark Mielke [Wed, 29 Jul 2020 04:11:28 +0000 (00:11 -0400)]
vncserver: Display check should avoid duplicate code

The display check had duplicate code to first check if the X11 port is
not in use, and then check that the RFB port is not in use. Eliminate
the duplicate code by using a for-loop.

4 years agovncserver: Display check should use named variables
Mark Mielke [Wed, 29 Jul 2020 03:57:22 +0000 (23:57 -0400)]
vncserver: Display check should use named variables

Several calculated values such as file paths and port numbers were
hard coded within strings or expressions, sometimes multiple
times. These values should be extracted into named variables to
improve self-documentation and avoid accidental divergence.

4 years agovncserver: Display check should check for lock file first
Mark Mielke [Wed, 29 Jul 2020 03:46:02 +0000 (23:46 -0400)]
vncserver: Display check should check for lock file first

Checking for the existence of `/tmp/.X<n>-lock` is a fast read-only
operation, while calls to bind() or connect() are more expensive and
may have side effects. Perform the fast operation first.

4 years agovncserver: Remove legacy HP-UX support
Mark Mielke [Wed, 29 Jul 2020 03:35:19 +0000 (23:35 -0400)]
vncserver: Remove legacy HP-UX support

The check for existence of `/usr/spool/sockets/X11/<n>` has been
removed. This file is only relevant on HP-UX, and TigerVNC dropped
support for HP-UX in commit 31e5aa3.

4 years agoEL 7 tigervnc.spec updates 1069/head
Mark Mielke [Tue, 28 Jul 2020 03:28:35 +0000 (23:28 -0400)]
EL 7 tigervnc.spec updates

Add missing build requirements: libpng-devel, zlib-devel

Remove obsolete build requirements: libXfont-devel

Fix unexpected rpm macro expansion `%{VERSION}` which is supposed
to be passed through as literal to `rpm -q --qf`. This hasn't
caused problems before, but it was found to cause problems when
built from EL 8 when it expanded to "1.10.1".

4 years agoEnhanced ComparingUpdateTracker to crop changed blocks 1031/head
Mark Mielke [Mon, 22 Jun 2020 03:54:55 +0000 (23:54 -0400)]
Enhanced ComparingUpdateTracker to crop changed blocks

64x64 changed block can be large for fine changes such as cursor
movement and typing in terminal windows, or an update to a clock.

If the block can be efficiently cropped, this will reduce latency
and bandwidth. Every pixel cropped is a pixel less to analyze, encode,
transmit, and decode.

The previous code already detected the top of the change in order
to determine if the block had changed. However, it did not use
this information to reduce the size of the change rectangle, nor
did it calculate any of the other edges.

The new code introduces detection of the other edges, and uses
the information to build a reduced area change rectangle. This
has the additional effect of reducing the number of discrete pixel
values in the change block which may allow a more efficient
encoding algorithm to be selected.

As this section of code is performance sensitive, the method
of detecting the edges has been optimized to quickly fall back
to pessimistic values as soon as a single comparison fails on
each edge. In the case that full 64x64 block are changing,
there will be three extra comparisons per block.

In cases where the change rectangle can be reduced from 64x64,
the reduced size of the change rectangle represents reduced
effort to encode, transfer, and decode the contained pixels.

In the case of images with high frequency changes, which
specifically includes text, the lossy JPEG encoding can be
highly distorted, especially with JPEG level 6 or less. The
quick flash from a distorted JPEG to a lossless JPEG can
appear as a flickering to some people. This effect was more
obvious when the surrounding area is not expected to change,
but is being distorted anyways due to being part of the 64x64
blocking algorithm.

In the case of a user typing in a terminal window, this change
may commonly reduce the number of pixels updated with every
character typed from 4096 pixels (64x64) to 640 pixels (32x20)
or less.

4 years agoWarn that WinVNC is unmaintained
Pierre Ossman [Thu, 16 Jul 2020 11:52:05 +0000 (13:52 +0200)]
Warn that WinVNC is unmaintained

4 years agoSplit WinVNC to a separate installer
Pierre Ossman [Thu, 16 Jul 2020 11:45:51 +0000 (13:45 +0200)]
Split WinVNC to a separate installer

It doesn't work very well so it shouldn't be included by default.

4 years agoRun maketarball through bash
Pierre Ossman [Thu, 16 Jul 2020 12:28:53 +0000 (14:28 +0200)]
Run maketarball through bash

It uses bash-isms so a POSIX shell will not work correctly.

4 years agoMove release cmake stuff to release directory
Pierre Ossman [Thu, 16 Jul 2020 11:38:01 +0000 (13:38 +0200)]
Move release cmake stuff to release directory

It's just confusing when this is split over two directories.

4 years agoTest packaging on Travis
Pierre Ossman [Thu, 16 Jul 2020 11:35:43 +0000 (13:35 +0200)]
Test packaging on Travis

Don't just build things, also test the various packaging.

4 years agoMerge branch 'master' of https://github.com/ayoder770/tigervnc
Pierre Ossman [Thu, 16 Jul 2020 13:28:45 +0000 (15:28 +0200)]
Merge branch 'master' of https://github.com/ayoder770/tigervnc

4 years agoMerge branch 'master-Fix-division-by-zero-exception-in-SSecurityPlain' of https:...
Pierre Ossman [Thu, 16 Jul 2020 13:27:37 +0000 (15:27 +0200)]
Merge branch 'master-Fix-division-by-zero-exception-in-SSecurityPlain' of https://github.com/MarkMielke/tigervnc

4 years agoCorrection to socket error connection message 1063/head
Andrew Yoder [Wed, 15 Jul 2020 23:12:18 +0000 (19:12 -0400)]
Correction to socket error connection message

4 years agoMerge branch 'user-trailing-spaces' of https://github.com/grulja/tigervnc
Pierre Ossman [Fri, 10 Jul 2020 13:11:30 +0000 (15:11 +0200)]
Merge branch 'user-trailing-spaces' of https://github.com/grulja/tigervnc

4 years agoFix division by zero exception in SSecurityPlain. 1048/head
Mark Mielke [Sat, 20 Jun 2020 10:15:39 +0000 (06:15 -0400)]
Fix division by zero exception in SSecurityPlain.

If using SSecurityPlain and the user specifies an empty username
and password, it will invoke InStream::checkNoWait(0) which will
cause a division by zero when calculating the number of available
items.

Enhance InStream::check() to behave properly when asked for
zero items, or zero sized items.

Add comments to InStream::check(), InStream::checkNoWait(),
and InStream::readBytes() to document expected behaviour
when requested to check or read zero items, or an item with
zero size.

4 years agoRemove trailing spaces in user name 1056/head
Jan Grulich [Fri, 3 Jul 2020 11:56:35 +0000 (13:56 +0200)]
Remove trailing spaces in user name

It's quite easy to make a mistake and add an additional space when configuring
users in the vncserver.users config file. You will then get an error that the
user doesn't exist and it's hard to spot the mistake. Same applies for a space
before the display number.

4 years agoFix some inappropriate format specifiers
Pierre Ossman [Thu, 18 Jun 2020 12:52:19 +0000 (14:52 +0200)]
Fix some inappropriate format specifiers

A "0x" prefix suggest hexadecimal values, not decimal.

4 years agoFix non-functional MaxDisconnectionTime
Pierre Ossman [Thu, 18 Jun 2020 07:20:17 +0000 (09:20 +0200)]
Fix non-functional MaxDisconnectionTime

Since 8e09912 this wasn't triggered properly as we checked if all
clients were gone before we actually removed the last client from our
list.

4 years agoUpdate gesture unit test to cover angle cornercase
Samuel Mannehed [Mon, 15 Jun 2020 11:41:39 +0000 (13:41 +0200)]
Update gesture unit test to cover angle cornercase

If the difference in angle is larger than 180 degrees we hit a corner
case. This commit modifies the coordinates of an existing test to cover
this.

4 years agoUse hypot(x,y) instead of sqrt(x*x + y*y)
Samuel Mannehed [Mon, 15 Jun 2020 11:38:15 +0000 (13:38 +0200)]
Use hypot(x,y) instead of sqrt(x*x + y*y)

4 years agoMerge branch 'regions' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Mon, 15 Jun 2020 07:57:28 +0000 (09:57 +0200)]
Merge branch 'regions' of https://github.com/CendioOssman/tigervnc

4 years agoImprove names of many gesturehandler unit tests
Samuel Mannehed [Fri, 5 Jun 2020 13:48:25 +0000 (15:48 +0200)]
Improve names of many gesturehandler unit tests

Makes it easier to understand what the tests do.

4 years agoFix typos in comments
Samuel Mannehed [Fri, 5 Jun 2020 13:47:56 +0000 (15:47 +0200)]
Fix typos in comments

4 years agoRemove unnecessary touchEnd from unit tests
Samuel Mannehed [Fri, 5 Jun 2020 13:46:56 +0000 (15:46 +0200)]
Remove unnecessary touchEnd from unit tests

4 years agoAdd proper spacing to if statements
Samuel Mannehed [Thu, 4 Jun 2020 11:22:51 +0000 (13:22 +0200)]
Add proper spacing to if statements

4 years agoAdd constant for TWOTOUCH_TIMEOUT
Samuel Mannehed [Thu, 4 Jun 2020 08:59:04 +0000 (10:59 +0200)]
Add constant for TWOTOUCH_TIMEOUT

4 years agoUpdate Info.plist copyright, added recommended key.
Brian P. Hinz [Sun, 31 May 2020 15:37:32 +0000 (11:37 -0400)]
Update Info.plist copyright, added recommended key.

4 years agoAutomatically pick the correct X.org patch
Mark Mielke [Sat, 15 Dec 2018 15:00:32 +0000 (10:00 -0500)]
Automatically pick the correct X.org patch

Update RPM package build process to automatically detect and apply
the correct X.org patch.

4 years agoMerge branch 'travis' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Sun, 31 May 2020 09:22:27 +0000 (11:22 +0200)]
Merge branch 'travis' of https://github.com/CendioOssman/tigervnc

4 years agoSet up Windows and macOS travis builds 1037/head
Pierre Ossman [Fri, 29 May 2020 14:11:12 +0000 (16:11 +0200)]
Set up Windows and macOS travis builds

4 years agoUse mingw's stdio routines where needed
Pierre Ossman [Sat, 30 May 2020 19:40:39 +0000 (21:40 +0200)]
Use mingw's stdio routines where needed

It allows us to use the more standard format specifiers.

4 years agoDon't catch exceptions by value
Pierre Ossman [Sat, 30 May 2020 19:26:49 +0000 (21:26 +0200)]
Don't catch exceptions by value

4 years agoDon't clear complex objects using memset()
Pierre Ossman [Sat, 30 May 2020 18:54:07 +0000 (20:54 +0200)]
Don't clear complex objects using memset()

This is fine for simple structs but not class based objects.

4 years agoSilence clang deprecated warnings on macOS
Pierre Ossman [Fri, 29 May 2020 16:58:11 +0000 (18:58 +0200)]
Silence clang deprecated warnings on macOS

We still target a very old version of macOS, which tends to make clang
very upset, so we need to turn off depercation warnings.

4 years agoMove pgettext_aux() declaration earlier
Pierre Ossman [Fri, 29 May 2020 16:48:26 +0000 (18:48 +0200)]
Move pgettext_aux() declaration earlier

Some compilers get upset if a declaration comes after the definition.

4 years agoRemove unused variable
Pierre Ossman [Fri, 29 May 2020 14:56:32 +0000 (16:56 +0200)]
Remove unused variable

4 years agoFix JpegCompressor::overrun() type change
Pierre Ossman [Fri, 29 May 2020 14:47:47 +0000 (16:47 +0200)]
Fix JpegCompressor::overrun() type change

The method it overloads got tweaked some time ago, so we need to make
sure this method follows suit.

4 years agoMerge branch 'ack-set-desktop-size' of https://github.com/matt335672/tigervnc
Pierre Ossman [Fri, 29 May 2020 14:49:51 +0000 (16:49 +0200)]
Merge branch 'ack-set-desktop-size' of https://github.com/matt335672/tigervnc

4 years agoSend response for refused SetDesktopSize 1036/head
matt335672 [Thu, 28 May 2020 10:04:03 +0000 (11:04 +0100)]
Send response for refused SetDesktopSize

Sends response for SetDesktopSize as per the community wiki
specification

4 years agoMerge branch 'gesture_handler_v3' of https://github.com/aeneby/tigervnc
Pierre Ossman [Fri, 29 May 2020 13:58:09 +0000 (15:58 +0200)]
Merge branch 'gesture_handler_v3' of https://github.com/aeneby/tigervnc

4 years agoSupport touch gestures on Windows 844/head
Samuel Mannehed [Sat, 28 Mar 2020 20:30:56 +0000 (21:30 +0100)]
Support touch gestures on Windows

This adds the same touch gesture support for Windows as already added
for Unix. Note that it uses Windows gesture detection instead of our own
here though to give the user a familiar experience. Unfortunately that
means we lose the three finger tap.

This also raises the base requirements to Windows 7 as that's when
Windows got proper touch support.

4 years agoImplement touch gesture handling on Unix
Aaron Sowry [Fri, 24 May 2019 00:00:47 +0000 (12:00 +1200)]
Implement touch gesture handling on Unix

Allows the user to perform certain important mouse operations using
touch gestures instead.

4 years agoCancel AltGr timeout on mouse events as well
Samuel Mannehed [Tue, 31 Mar 2020 20:02:21 +0000 (22:02 +0200)]
Cancel AltGr timeout on mouse events as well

We have a timer after Ctrl is pressed in order to see if an Alt will
come right after. Ctrl + Alt is what windows sends for AltGr.
If a key other than Alt was pressed we knew that we could cancel this
timer, this commit extends that to mouse events too.

Since this detection breaks the true order of events we want to make
a decision as fast as possible.

4 years agoImplement X Input pointer handling for Unix
Aaron Sowry [Thu, 25 Apr 2019 00:31:23 +0000 (12:31 +1200)]
Implement X Input pointer handling for Unix

Switch from using Core events to using X Input events for pointer
devices in order to differentiate between mouse events and touch events.

Because FLTK doesn't understand X Input 2, we intercept these events and
translate them to core events where possible.

4 years agoIgnore bogus FL_MOVE events from FLTK
Samuel Mannehed [Tue, 5 May 2020 08:39:13 +0000 (10:39 +0200)]
Ignore bogus FL_MOVE events from FLTK

4 years agoFix position for click and drag with EmulateMB
Alex Tanskanen [Wed, 22 Apr 2020 10:15:06 +0000 (12:15 +0200)]
Fix position for click and drag with EmulateMB

If you have the setting "Emulate middle mouse button" turned on, a click
and drag can fail if it is done very quickly. The position of the
initial click will be incorrect in such a case because the timeout will
delay events.

4 years agoAdd unit tests for EmulateMB
Alex Tanskanen [Thu, 16 Apr 2020 13:38:49 +0000 (15:38 +0200)]
Add unit tests for EmulateMB

4 years agoOpen X11 display properly
Pierre Ossman [Tue, 28 May 2019 06:42:16 +0000 (08:42 +0200)]
Open X11 display properly

We need to make sure everything happens in the correct order during
startup for the X11 display to open correctly. Primarily it means
we need to parse the arguments and open the display before anything
might make any X11 calls, as we may have a -display argument.

4 years agoRemove default config alert
Pierre Ossman [Tue, 28 May 2019 06:41:40 +0000 (08:41 +0200)]
Remove default config alert

We don't exit here, so it's not a fatal error. It's also a fairly common
scenario, so remove the alert completely.

4 years agoReject too large screen resize requests
Pierre Ossman [Sat, 23 May 2020 10:17:55 +0000 (12:17 +0200)]
Reject too large screen resize requests

We'll just crash later if we try to use such a large screen, so reject
the request from the client instead and keep the server running.

4 years agoCatch errors resizing framebuffer
Pierre Ossman [Sat, 23 May 2020 10:17:34 +0000 (12:17 +0200)]
Catch errors resizing framebuffer

4 years agoAdd final line break to FatalError() calls
Pierre Ossman [Sat, 23 May 2020 10:16:50 +0000 (12:16 +0200)]
Add final line break to FatalError() calls

It expects the callers to include this, so make sure we're consistently
providing one.

4 years agoProperly store certificate exceptions
Pierre Ossman [Thu, 21 May 2020 19:10:38 +0000 (21:10 +0200)]
Properly store certificate exceptions

The previous method stored the certificates as authorities, meaning that
the owner of that certificate could impersonate any server it wanted
after a client had added an exception.

Handle this more properly by only storing exceptions for specific
hostname/certificate combinations, the same way browsers or SSH does
things.

4 years agoUpdate Indonesian translation
Andika Triwidada [Fri, 15 May 2020 23:53:00 +0000 (06:53 +0700)]
Update Indonesian translation

4 years agoUse exit_vncviewer() for early errors
Pierre Ossman [Tue, 28 May 2019 06:41:04 +0000 (08:41 +0200)]
Use exit_vncviewer() for early errors

Makes things more consistent and avoids surprises.

4 years agoBump up Windows version from Vista to Windows 7
Samuel Mannehed [Fri, 20 Mar 2020 14:43:24 +0000 (15:43 +0100)]
Bump up Windows version from Vista to Windows 7

4 years agoGet rid of magical assignment to Region 1009/head
Pierre Ossman [Fri, 1 May 2020 15:37:04 +0000 (17:37 +0200)]
Get rid of magical assignment to Region

Might as well make these explicit so the cost is apparent.