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.
(cherry picked from commit 479ec11a2e)
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.
(cherry picked from commit 7fe85cd4a7)
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.
(cherry picked from commit 37f3a8b47f)
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.
(cherry picked from commit 9023a2ec18)
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.
(cherry picked from commit 86ffb61a3b)
There was an issue with the new grabs that were introduced in commit
2289342de7. 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.
(cherry picked from commit 72e94ca93d)
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.
(cherry picked from commit 39086068b9)
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.
(cherry picked from commit 6a1eaff040)
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.
(cherry picked from commit c8af502bd2)
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.
(cherry picked from commit 72d632673b)
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.
(cherry picked from commit fb561eb321)
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.
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.