]> source.dussan.org Git - tigervnc.git/log
tigervnc.git
2 years agoRelicense MonitorArrangement widget
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.

2 years agoAvoid leaking overlay memory
Pierre Ossman [Thu, 23 Dec 2021 15:06:14 +0000 (16:06 +0100)]
Avoid leaking overlay memory

Fl_RGB_Image doesn't take ownership of the pixel data, so we have to
explicitly free this as well once we are done.

2 years agoHandle empty lines in server history
Pierre Ossman [Thu, 23 Dec 2021 15:00:20 +0000 (16:00 +0100)]
Handle empty lines in server history

2 years agoFix typo in mirror monitor detection
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.

2 years agoBe more paranoid about monitor info
Pierre Ossman [Thu, 23 Dec 2021 13:50:35 +0000 (14:50 +0100)]
Be more paranoid about monitor info

These function are not guaranteed to succeed, and we've had reports that
they fail on ARM. So make sure we more properly check return values.

2 years agoUpdate Serbian translation
Мирослав Николић [Mon, 13 Dec 2021 16:27:00 +0000 (18:27 +0200)]
Update Serbian translation

2 years agoMerge branch 'display' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Fri, 10 Dec 2021 12:53:56 +0000 (13:53 +0100)]
Merge branch 'display' of https://github.com/CendioOssman/tigervnc

2 years agoAdd headings/groups for options 1390/head
Pierre Ossman [Fri, 10 Dec 2021 09:38:20 +0000 (10:38 +0100)]
Add headings/groups for options

Try to be more consistent that related options should have a group box
around them.

2 years agoRename "Screen" tab to "Display"
Pierre Ossman [Fri, 10 Dec 2021 09:22:54 +0000 (10:22 +0100)]
Rename "Screen" tab to "Display"

This is what pretty much everyone else calls these kind of settings, so
let's change so users feel familiar.

2 years agoSimplify screen settings
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.

2 years agoAdd comments to stored parameters list
Pierre Ossman [Thu, 9 Dec 2021 15:53:22 +0000 (16:53 +0100)]
Add comments to stored parameters list

Clarify what this list is used for, and organize it so it is easier to
match to the options dialog.

2 years agoDocument raised CMake requirement
Pierre Ossman [Sat, 27 Nov 2021 15:55:47 +0000 (16:55 +0100)]
Document raised CMake requirement

We raised the requirement in cb3c78f but forgot to update the
documentation.

2 years agoxserver21.1.1.patch: Add Xorg 21 patch 1383/head
Joakim Tjernlund [Fri, 26 Nov 2021 10:15:21 +0000 (11:15 +0100)]
xserver21.1.1.patch: Add Xorg 21 patch

2 years agoxvnc: adapt for 1.21
Joakim Tjernlund [Wed, 24 Nov 2021 20:10:56 +0000 (21:10 +0100)]
xvnc: adapt for 1.21

VENDOR_STRING is gone as is DEFAULT_LOG_VERBOSITY
site.h has been removed and is not needed.

2 years agoxorg-version.h: Increase supported Xorg version to 1.21
Joakim Tjernlund [Wed, 24 Nov 2021 20:09:36 +0000 (21:09 +0100)]
xorg-version.h: Increase supported Xorg version to 1.21

2 years agoMerge pull request #1382 from williamsjoblom/master
Samuel Mannehed [Wed, 24 Nov 2021 13:41:37 +0000 (14:41 +0100)]
Merge pull request #1382 from williamsjoblom/master

Be consistent in "full screen" and "full-screen" use

2 years agoBe consistent in "full screen" and "full-screen" use 1382/head
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.

2 years agoMerge pull request #1380 from williamsjoblom/master
Samuel Mannehed [Tue, 23 Nov 2021 10:09:12 +0000 (11:09 +0100)]
Merge pull request #1380 from williamsjoblom/master

Deduplicate vncviewer error messages

2 years agoDeduplicate vncviewer error messages 1380/head
William Sjöblom [Mon, 22 Nov 2021 16:36:35 +0000 (17:36 +0100)]
Deduplicate vncviewer error messages

vncviewer previously had a the same localized error message duplicated
on a bunch of places. Pull these duplicates out into a single function.

2 years agoFix formatting of -rfbport in man pages
Pierre Ossman [Tue, 9 Nov 2021 11:24:03 +0000 (12:24 +0100)]
Fix formatting of -rfbport in man pages

2 years agoUpdate French translation
Stéphane Aulery [Sun, 7 Nov 2021 16:52:00 +0000 (17:52 +0100)]
Update French translation

2 years agoMerge branch 'cmake' of https://github.com/CendioOssman/tigervnc
Pierre Ossman [Fri, 5 Nov 2021 12:54:46 +0000 (13:54 +0100)]
Merge branch 'cmake' of https://github.com/CendioOssman/tigervnc

2 years agoRaise CMake requirement to 3.10 1366/head
Pierre Ossman [Fri, 5 Nov 2021 11:53:11 +0000 (12:53 +0100)]
Raise CMake requirement to 3.10

It's difficult to support both old and new versions, so raise the
requirement to the oldest that is commonly used, which is CMake 3.10.2
on Ubuntu 18.04.

2 years agoDon't specify SOURCE in custom targets
Pierre Ossman [Fri, 5 Nov 2021 12:06:07 +0000 (13:06 +0100)]
Don't specify SOURCE in custom targets

They don't really contribute to anything as the command line is fixed,
and it makes CMake 3.20+ upset since it cannot find that file and
instead thinks we meant maketarball.in (CMP0115).

2 years agoDrop Ubuntu 16.04 from builds
Pierre Ossman [Fri, 5 Nov 2021 11:50:59 +0000 (12:50 +0100)]
Drop Ubuntu 16.04 from builds

This version of Ubuntu is no longer fully supported so let's stop caring
about builds there.

2 years agoLog decoding stats on disconnect
Pierre Ossman [Thu, 4 Nov 2021 08:16:00 +0000 (09:16 +0100)]
Log decoding stats on disconnect

Can be helpful to see what encodings were actually used during a
connection, and how they performed.

2 years agoIncrease maximum input buffer
Pierre Ossman [Thu, 4 Nov 2021 08:01:08 +0000 (09:01 +0100)]
Increase maximum input buffer

macOS' built in VNC server unfortunately sends the entire monitor in a
single rect, so we need to be prepared to buffer a lot of data in case
the monitor has a large resolution.

2 years agoThrow more descriptive error on rect read error
Pierre Ossman [Thu, 4 Nov 2021 08:00:33 +0000 (09:00 +0100)]
Throw more descriptive error on rect read error

Gives a bit more context where this error happened.

2 years agoRemove single cpu decoder shortcut
Pierre Ossman [Thu, 4 Nov 2021 07:38:46 +0000 (08:38 +0100)]
Remove single cpu decoder shortcut

Single CPU machines are extremely rare now, so let's avoid the hassle of
multiple code paths.

2 years agoUpdate Swedish translation
Göran Uddeborg [Tue, 19 Oct 2021 12:58:00 +0000 (14:58 +0200)]
Update Swedish translation

3 years agoFix closing reconnect dialog logic
Pierre Ossman [Thu, 14 Oct 2021 10:42:05 +0000 (12:42 +0200)]
Fix closing reconnect dialog logic

If you close the reconnect dialog then we should assume that you want to
close things, not that you want to reconnect. Unfortunately FLTK returns
the first choice when closing the dialog, so that needs to be the
"Cancel" alternative.

3 years agoMerge branch 'master' of https://github.com/twhitehead/tigervnc
Pierre Ossman [Thu, 14 Oct 2021 07:09:01 +0000 (09:09 +0200)]
Merge branch 'master' of https://github.com/twhitehead/tigervnc

3 years agoDon't fail on user CA/CRL problems
Pierre Ossman [Thu, 14 Oct 2021 06:57:08 +0000 (08:57 +0200)]
Don't fail on user CA/CRL problems

The certificates might still be fine using the system trust store, or
the user can make an exception. So let's just log and continue on.

This got very common after 960c7d2 where we now always have a default
value for these settings.

3 years agoSystem certificate load returns number loaded not GNUTLS_E_SUCCESS 1347/head
Tyson Whitehead [Fri, 1 Oct 2021 22:35:19 +0000 (18:35 -0400)]
System certificate load returns number loaded not GNUTLS_E_SUCCESS

3 years agoMerge pull request #1349 from samhed/fullscreenLevel
Samuel Mannehed [Wed, 6 Oct 2021 13:40:24 +0000 (15:40 +0200)]
Merge pull request #1349 from samhed/fullscreenLevel

Workaround FLTK bug that causes OptionsDialog to appear behind DesktopWindow

3 years agoWorkaround options window appearing behind viewer 1349/head
Samuel Mannehed [Wed, 6 Oct 2021 12:06:22 +0000 (14:06 +0200)]
Workaround options window appearing behind viewer

FLTK's fullscreen_x() function will always put the window on a high
level (NSStatusWindowLevel = 25), even if the window doesn't have focus.
This causes the OptionsDialog to end up behind the DesktopWindow when
the fullscreen function is called. Until we can rest assured that most
people building TigerVNC will use a fixed version of FLTK, we will need
this workaround.

3 years agoMerge pull request #1350 from samhed/serverdialogmodal
Samuel Mannehed [Wed, 6 Oct 2021 08:44:39 +0000 (10:44 +0200)]
Merge pull request #1350 from samhed/serverdialogmodal

Remove modal property from ServerDialog

3 years agoMerge branch 'master' of https://github.com/johahauf/tigervnc
Pierre Ossman [Wed, 6 Oct 2021 06:57:13 +0000 (08:57 +0200)]
Merge branch 'master' of https://github.com/johahauf/tigervnc

3 years agoRemove modal property from ServerDialog 1350/head
Samuel Mannehed [Tue, 5 Oct 2021 14:28:59 +0000 (16:28 +0200)]
Remove modal property from ServerDialog

Modal windows are meant to be child windows such as menus or popups that
are intended to always appear in front of its parent.

Modal FLTK windows without a parent seem to behave strangely on macOS.
Such windows can appear in front of their modal children windows.
When opening OptionsDialog from ServerDialog, it was easy to get to a
broken state by then switching focus back to the ServerDialog. This
would cause the ServerDialog to appear in front, but not be useable as
the options window would still have control of mouse and keyboard.

Additionally, modal windows without parents appear in front of other
normal applications on macOS. This means that the ServerDialog couldn't
be put behind Safari for example.

The fact that ServerDialog was a "modal" window was a bit strange,
seeing as it doesn't have any parent windows. Removing the modal
property from this window causes all the strange-ness to go away.

3 years agoMerge pull request #1344 from samhed/grabOnFocus
Samuel Mannehed [Tue, 5 Oct 2021 09:23:55 +0000 (11:23 +0200)]
Merge pull request #1344 from samhed/grabOnFocus

Only grab keyboard when we have focus

3 years agoOnly grab keyboard when we have focus 1344/head
Samuel Mannehed [Thu, 23 Sep 2021 14:31:59 +0000 (16:31 +0200)]
Only grab keyboard when we have focus

There was an issue with the new grabs that were introduced in commit
2289342de7222e4ff2483eae95bb9898830e6097. On macOS when running
vncviewer in fullscreen on one monitor, we saw that we sometimes got
resize and fullscreen events when switching the focus away from
vncviewer. With the changes in the commit mentioned above this meant
that we immediately grabbed the keyboard again, thus never releasing it.

Fixes #1332.

3 years agoCreate helper function for grabKeyboard conditions
Samuel Mannehed [Thu, 23 Sep 2021 14:31:19 +0000 (16:31 +0200)]
Create helper function for grabKeyboard conditions

3 years agoAdjust default directory for configuration file save and load 1331/head
Johannes [Sun, 12 Sep 2021 12:58:22 +0000 (14:58 +0200)]
Adjust default directory for configuration file save and load

3 years agoUpdate Korean translation
JiYoon Kwon [Sun, 19 Sep 2021 14:07:00 +0000 (23:07 +0900)]
Update Korean translation

3 years agoUpdate Russian translation
Yuri Kozlov [Thu, 16 Sep 2021 04:50:00 +0000 (07:50 +0300)]
Update Russian translation

3 years agoUpdate Swedish translation
Göran Uddeborg [Wed, 15 Sep 2021 20:39:00 +0000 (22:39 +0200)]
Update Swedish translation

3 years agoUpdate Chinese (traditional) translation
Yi-Jyun Pan [Wed, 15 Sep 2021 14:22:00 +0000 (22:22 +0800)]
Update Chinese (traditional) translation

3 years agoUpdate Finnish translation
Lauri Nurmi [Tue, 14 Sep 2021 16:45:00 +0000 (19:45 +0300)]
Update Finnish translation

3 years agoUpdate Czech translation
Petr Pisar [Sun, 12 Sep 2021 12:54:00 +0000 (14:54 +0200)]
Update Czech translation

3 years agoUpdate Bulgarian translation
Alexander Shopov [Fri, 10 Sep 2021 10:36:00 +0000 (12:36 +0200)]
Update Bulgarian translation

3 years agoTest Java builds in github actions 1328/head
Pierre Ossman [Fri, 10 Sep 2021 12:42:29 +0000 (14:42 +0200)]
Test Java builds in github actions

3 years agoUpdate Hebrew translation
Yaron Shahrabani [Fri, 10 Sep 2021 07:16:00 +0000 (10:16 +0300)]
Update Hebrew translation

3 years agoUpdate German translation
Mario Blättermann [Thu, 9 Sep 2021 16:33:00 +0000 (18:33 +0200)]
Update German translation

3 years agoUpdate Ukrainian translation
Yuri Chornoivan [Thu, 9 Sep 2021 09:43:00 +0000 (12:43 +0300)]
Update Ukrainian translation

3 years agoUpdate Indonesian translation
Andika Triwidada [Thu, 9 Sep 2021 08:37:00 +0000 (15:37 +0700)]
Update Indonesian translation

3 years agoGive all monitor names when mirrored
Pierre Ossman [Thu, 9 Sep 2021 10:24:50 +0000 (12:24 +0200)]
Give all monitor names when mirrored

If a monitor is part of a set of mirrored monitors, then give the name
of all used monitors as we don't know which one the user will most
strongly associate with what they see.

3 years agoMore user friendly monitor name on Windows
Pierre Ossman [Thu, 9 Sep 2021 11:09:10 +0000 (13:09 +0200)]
More user friendly monitor name on Windows

The device name is very internal and likely of little use to a user.
Instead give the more user friendly string we can get out of the system.

3 years agoUse std::string for monitor names
Pierre Ossman [Thu, 9 Sep 2021 10:19:46 +0000 (12:19 +0200)]
Use std::string for monitor names

Makes it a lot easier to deal with the allocation of memory for the
string, avoiding any limits.

3 years agoInline the Windows monitor name code
Pierre Ossman [Thu, 9 Sep 2021 09:05:53 +0000 (11:05 +0200)]
Inline the Windows monitor name code

It's just used in this one place, and isn't very large. Also move things
around a bit to avoid having to define new complex types.

3 years agoFix corner case in monitor index calculation
Pierre Ossman [Thu, 9 Sep 2021 09:04:21 +0000 (11:04 +0200)]
Fix corner case in monitor index calculation

Fix a bug in the comparison function that could result in the wrong
index being assigned to a monitor. Change the logic to more directly map
to the description.

3 years agoHandle mirrored monitors on X11
Pierre Ossman [Thu, 9 Sep 2021 09:01:47 +0000 (11:01 +0200)]
Handle mirrored monitors on X11

macOS and Windows present mirrored monitors as a single virtual monitor,
but X11 exposes this scenario as two distinct monitors with identical
coordinates. This messes up our logic, and is likely confusing for the
user. So instead we'll ignore any monitors that have identical
coordinates to any already seen monitors.

3 years agoChange development version to 1.12.80
Pierre Ossman [Wed, 8 Sep 2021 08:41:57 +0000 (10:41 +0200)]
Change development version to 1.12.80

3 years agoUpdate translation template file
Pierre Ossman [Wed, 8 Sep 2021 08:35:58 +0000 (10:35 +0200)]
Update translation template file

3 years agoClean up some error strings
Pierre Ossman [Wed, 8 Sep 2021 07:18:57 +0000 (09:18 +0200)]
Clean up some error strings

Try to reuse and split things so that it makes things easier for the
translators.

3 years agoConsistently use exceptions for parameter errors
Pierre Ossman [Wed, 8 Sep 2021 07:11:28 +0000 (09:11 +0200)]
Consistently use exceptions for parameter errors

Clean up the structure around storing and loading parameters and server
history so that failures will always be reported by using exceptions.

3 years agoUse classic FILE I/O for storing server history
Pierre Ossman [Wed, 8 Sep 2021 07:02:11 +0000 (09:02 +0200)]
Use classic FILE I/O for storing server history

Error handling is more straight forward in the C file interface.

3 years agoMerge pull request #1253 from binary-manu/accented-chars
Brian Hinz [Tue, 7 Sep 2021 02:24:24 +0000 (22:24 -0400)]
Merge pull request #1253 from binary-manu/accented-chars

Handle keys reported only by KeyEvent.getExtendedKeyCode

3 years agoClean up global event handler structure
Pierre Ossman [Mon, 6 Sep 2021 08:15:36 +0000 (10:15 +0200)]
Clean up global event handler structure

Let's separate the standard global event handling from the hacky
workarounds, for clarity.

3 years agoRestore FLTK event dispatcher on exit
Pierre Ossman [Mon, 6 Sep 2021 08:14:23 +0000 (10:14 +0200)]
Restore FLTK event dispatcher on exit

3 years agoMerge branch 'fullscreens-added-removed' of https://github.com/x11clone/x11clone
Pierre Ossman [Thu, 2 Sep 2021 14:51:03 +0000 (16:51 +0200)]
Merge branch 'fullscreens-added-removed' of https://github.com/x11clone/x11clone

3 years agoTolerate carriage return in config files
Pierre Ossman [Thu, 2 Sep 2021 14:28:16 +0000 (16:28 +0200)]
Tolerate carriage return in config files

If the file has been transferred from a Windows system then it might
have \r\n line endings instead of \n. Make sure this doesn't leak in to
the parameter values.

3 years agoFix inconsistent line endings in vncviewer configuration file
Meng Dong [Mon, 12 Jul 2021 02:45:11 +0000 (10:45 +0800)]
Fix inconsistent line endings in vncviewer configuration file

3 years agoInclude translations in macOS and Windows builds 1318/head
Pierre Ossman [Fri, 27 Aug 2021 09:15:54 +0000 (11:15 +0200)]
Include translations in macOS and Windows builds

3 years agoDisable dangerous macOS SDK macros
Pierre Ossman [Fri, 27 Aug 2021 09:07:58 +0000 (11:07 +0200)]
Disable dangerous macOS SDK macros

They define macros such as "check()" which causes our code to break as
we have methods with that name.

3 years agoMerge branch 'fb-session-nfs' of https://github.com/zpytela/tigervnc
Pierre Ossman [Thu, 26 Aug 2021 10:10:16 +0000 (12:10 +0200)]
Merge branch 'fb-session-nfs' of https://github.com/zpytela/tigervnc

3 years agoExpose reconnect setting in options dialog
Pierre Ossman [Fri, 23 Jul 2021 11:32:50 +0000 (13:32 +0200)]
Expose reconnect setting in options dialog

3 years agoRetry connection in case of an error
Johannes [Sat, 30 Jan 2021 23:12:50 +0000 (00:12 +0100)]
Retry connection in case of an error

3 years agoMerge branch 'x0-interface-option' of https://github.com/sotho/tigervnc
Pierre Ossman [Fri, 23 Jul 2021 08:33:11 +0000 (10:33 +0200)]
Merge branch 'x0-interface-option' of https://github.com/sotho/tigervnc

3 years agoAdd -interface option to x0vncserver 1300/head
Alexander Elbs [Thu, 22 Jul 2021 15:32:35 +0000 (17:32 +0200)]
Add -interface option to x0vncserver

3 years agoMerge branches 'host-name-max', 'fix-build-viewer-off' and 'fix-case-insensitive...
Pierre Ossman [Fri, 23 Jul 2021 08:02:20 +0000 (10:02 +0200)]
Merge branches 'host-name-max', 'fix-build-viewer-off' and 'fix-case-insensitive-fs' of https://github.com/arichardson/tigervnc

3 years agoKeep ownership of second selection when first is lost
Pierre Ossman [Tue, 20 Jul 2021 14:38:04 +0000 (16:38 +0200)]
Keep ownership of second selection when first is lost

This fixes regression introduced by the extended clipboard extension.
Previously it was possible for the server to hold on to the CLIPBOARD
selection even if another application took ownership of PRIMARY. This is
important to handle the common use case of selecting something in order
to paste over it.

The new request based model doesn't readily support this as we assume
the client has lost its data once we push the new PRIMARY selection to
it. So to handle this we have the maintain a cache of the client's data,
and make sure to fill that cache before we do anything that might cause
the client to lose the data.

3 years agoSimply screen refresh handler
Pierre Ossman [Tue, 20 Jul 2021 12:24:10 +0000 (14:24 +0200)]
Simply screen refresh handler

We only need to check the event type once, and preferably early, and
avoid doing more work than necessary.

3 years agoOnly log error when setting FullScreenSelectedMonitors
Pierre Ossman [Mon, 19 Jul 2021 15:35:29 +0000 (17:35 +0200)]
Only log error when setting FullScreenSelectedMonitors

We don't want the log to spam every time this parameter is used so only
complain from the parses when the value is changed.

3 years agoDon't reference specific variable in class
Pierre Ossman [Mon, 19 Jul 2021 15:31:45 +0000 (17:31 +0200)]
Don't reference specific variable in class

This class is generic and should not reference a specific instance of
it.

3 years agoAvoiding final period in log messages
Pierre Ossman [Mon, 19 Jul 2021 15:28:15 +0000 (17:28 +0200)]
Avoiding final period in log messages

Try to be consistent with existing log messages.

3 years agoClean up style in recent monitor code
Pierre Ossman [Mon, 19 Jul 2021 15:22:43 +0000 (17:22 +0200)]
Clean up style in recent monitor code

Fix some indentation issues and make sure everything* uses CamelCase.

* MonitorArrangement is left as snake_case in order to pretend it is an
  independent FLTK widget class.

3 years agoRefresh MonitorArrangement on configuration change 1295/head
Hugo Lundin [Fri, 16 Jul 2021 14:31:16 +0000 (16:31 +0200)]
Refresh MonitorArrangement on configuration change

MonitorArrangement (in the options dialog) never changes when the system
monitor configuration changes. Therefore, the user can get into a state
where the reality doesn't match what is shown (when a monitor is
added/removed, resolution or position changed etc).

All these changes triggers an event in FLTK
(FL_SCREEN_CONFIGURATION_CHANGED). This commit adds an event handler in
MonitorArrangement and refreshes the widget whenever that event occurs.

Because Fl_Handler does not have a void*-argument (and we must be able
to access the widget from our handler callback) a static set of
instances have been added, which all will receive the events.

3 years agoMerge branch 'selected_monitors' of https://github.com/hugolundin/tigervnc
Pierre Ossman [Fri, 16 Jul 2021 14:10:36 +0000 (16:10 +0200)]
Merge branch 'selected_monitors' of https://github.com/hugolundin/tigervnc

3 years agoAdd monitor description to tooltip 1282/head
Hugo Lundin [Tue, 13 Jul 2021 13:55:54 +0000 (15:55 +0200)]
Add monitor description to tooltip

It might be useful to have more information about a monitor when
configuring its settings in the Options menu. Therefore, this commit
adds support for showing additional information about a monitor
(resolution and platform-specific name).

3 years agoExplicitly choose current monitor
Hugo Lundin [Thu, 15 Jul 2021 11:32:19 +0000 (13:32 +0200)]
Explicitly choose current monitor

There are no guarantees from the WM that calling `fullscreen_screens`
with all monitor indices set to `-1` results in the window's current
monitor being used. Because FullScreenMode uses the word "current"
we want to explicitly ask the WM to use that monitor.

3 years agoAdd fullscreen mode for selected monitors
Hugo Lundin [Tue, 13 Jul 2021 11:58:12 +0000 (13:58 +0200)]
Add fullscreen mode for selected monitors

The user might not always want to use all monitors when in fullscreen
mode, but instead only a few. This commit adds support for configuring
selected monitors from command line, in the config file and graphically
in the options menu.

Because it might be hard to guarantee the consistency of monitor
identifiers coming from third-parties (for example FLTK), it has been
decided to use our own numerical identifier. This identifier is based on
the monitor's positions. The mapping between this identifier and the
indices used by FLTK is done by MonitorIndicesParameter.

3 years agoAdd fullscreen mode parameter
Hugo Lundin [Thu, 15 Jul 2021 10:52:56 +0000 (12:52 +0200)]
Add fullscreen mode parameter

Before this commit, `FullScreen` and `FullScreenAllMonitors` could be
used to configure whether to use the current monitor in fullscreen,
or all monitors in fullscreen.

This commit deprecates `FullScreenAllMonitors` in favour of
`FullScreenMode` (which can either be `current` or `all`). This allows
for additional modes to be added, without the risk of having invalid
states (for example two activate two different fullscreen modes at the
same time).

A new concept has been added; read-only parameters. They are parameters
that will be read, but never written back. This allows for migration
paths to be constructed, where a parameter can be taken to consideration
but then for example be discarded, logged or changed into something else.

This has been used for `FullScreenAllMonitors` to provide a migration
path. On startup of vncviewer, if `FullScreenAllMonitors` is enabled,
`FullScreenMode=all` will be automatically enabled instead. The next
time the configuration file is written to disk, `FullScreenAllMonitors`
will then be removed.

3 years agoCalculate overlay position from window size
Hugo Lundin [Wed, 14 Jul 2021 12:55:56 +0000 (14:55 +0200)]
Calculate overlay position from window size

Previously, it was assumed that all monitors (and especially the primary
monitor, index 0) was inside the window when we calculate the position
of the overlay.

That might not always be the case, for example when using fullscreen
mode over a narrower set of monitors. This commit does so the overlay is
positioned correctly based on the actual window size, instead of what we
expect it to be.

3 years agoRelease displays not enclosed by the window
Hugo Lundin [Fri, 16 Jul 2021 11:26:08 +0000 (13:26 +0200)]
Release displays not enclosed by the window

cocoa_capture_displays it captures all displays enclosed by the
window_rect. If a set of displays were captured, but the configuration of
what monitors to use changed, a second call would only add to the set
of captured displays. Therefore, if the user enabled
FullScreenAllMonitors (all displays captured) and then disabled it (only
one display captured) they would get into a state were monitors not used
for the VNC session still were captured (which on macOS for example,
results in displays being unusable for other things).

This has now been fixed, resulting in monitors outside the window_rect
not being unnecessarily captured.

3 years agoFix priority string when using newer GnuTLS 1293/head
Jan Grulich [Thu, 15 Jul 2021 18:42:16 +0000 (20:42 +0200)]
Fix priority string when using newer GnuTLS

The call of gnutls_set_default_priority_append() expects a normal priority
string, which means it must not start with ':'.

3 years agoCapture all displays inside the viewport (macOS)
Hugo Lundin [Tue, 13 Jul 2021 11:07:41 +0000 (13:07 +0200)]
Capture all displays inside the viewport (macOS)

It was only possible to capture either the current, or all displays
previously. This could become an issue if you want to show a vnc session
over only a selected set of displays, because then we only want to
capture those displays.

The solution in the commit was chosen because it handles all cases - by
looking at what monitors are enclosed by the viewport the implementation
is independent on any configuration, but instead captures the monitors
actually being used.

3 years agoAllow building with -DBUILD_VIEWER=OFF 1290/head
Alex Richardson [Wed, 14 Jul 2021 13:03:43 +0000 (14:03 +0100)]
Allow building with -DBUILD_VIEWER=OFF

Without this change I get CMake errors due to use of ${FLTK_INCLUDE_DIR}
and references to the non-existent vncviewer target.

3 years agoRename Input.h to vncInput.h to fix building on case-insensitive FS 1291/head
Alex Richardson [Wed, 14 Jul 2021 13:13:54 +0000 (14:13 +0100)]
Rename Input.h to vncInput.h to fix building on case-insensitive FS

I am cross-compiling from macOS for a FreeBSD-derived system so my host
file system is case insensitive but the target isn't. Without this change
I get the following warnings which show that the vnc "Input.h" is being
included from mi/mi.h instead of the xserver "input.h":
```
In file included from /Users/alex/cheri/xvnc-server/hw/vnc/Input.c:33:
/Users/alex/cheri/xvnc-server/mi/mi.h:55:10: warning: non-portable path to file '"Input.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "input.h"
         ^~~~~~~~~
         "Input.h"
```

3 years agoFix build on systems without HOST_NAME_MAX 1289/head
Alex Richardson [Wed, 14 Jul 2021 13:01:15 +0000 (14:01 +0100)]
Fix build on systems without HOST_NAME_MAX

Some operating systems such as FreeBSD don't define a HOST_NAME_MAX
macro. The portable approach to determine the real host name limit is
calling sysconf(_SC_HOST_NAME_MAX) so do that instead.

3 years agoMerge branch 'utilize-system-wide-crypto' of https://github.com/grulja/tigervnc
Pierre Ossman [Wed, 14 Jul 2021 12:24:08 +0000 (14:24 +0200)]
Merge branch 'utilize-system-wide-crypto' of https://github.com/grulja/tigervnc