| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
|
|
|
|
|
| |
This allows us to separate accidentally unused, from explicitly unused
parameters, which allows us to turn on such checks in the compiler.
|
|\ |
|
| |
| |
| |
| |
| | |
These have nothing to do with layout, so let's split them to their own
file.
|
| |
| |
| |
| |
| |
| |
| | |
Let's separate TigerVNC specific things from stuff that could be part of
upstream FLTK. These are files that we would like to collaborate with
other FLTK users, so they are more liberally licensed and avoid using
TigerVNC specific things.
|
|/
|
|
|
|
|
|
|
|
| |
The system steals keyboard events for certain system keyboard shortcuts,
e.g. Cmd+Tab. Unfortunately this isn't considered a focus loss, so we
don't realise we've lost a few keyboard events and can end up in a
confused state.
Fortunately it is possible to detect when this happens and reset the
keyboard state, just like we do when focus is lost.
|
|
|
|
| |
Add also missing <stdlib.h> where required.
|
|
|
|
|
| |
vncviewer previously had a the same localized error message duplicated
on a bunch of places. Pull these duplicates out into a single function.
|
| |
|
|\ |
|
| | |
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| | |
Include something more user friendly when we need to fail fatally and
not just the technical error.
|
| |
| |
| |
| |
| | |
Windows either completely omits WM_KEYUP for these, or only sends it
just before the next WM_KEYDOWN for the key.
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Not every mouse has three buttons e.g. laptops. Some OS might not
have support for middle mouse button emulation.
This commit adds emulation for middle mouse button when pressing both
left and right mouse button simultaneously.
|
|
|
|
|
| |
This was not necessary since you could use ESC key or simply just
clicking outside of the context menu to close the menu.
|
|
|
|
|
|
|
|
| |
If the server doesn't support local cursors and want to render them
itself then we need to make sure the local cursor is invisible.
This also makes sure we always have some cursor allocated, so we can
remove the checks in some places.
|
|
|
|
|
| |
In prepartion for better clipboard extensions that can send Unicode
data between the client and server.
|
|
|
|
|
| |
Change the internal clipboard API to use a request based model in
order to be prepared for more advanced clipboard transfers.
|
|
|
|
|
| |
We convert between UTF-8 and ISO 8859-1 (latin 1) in several places
so create some common routines for this.
|
|
|
|
|
|
| |
We now filter incoming data, which means we can start assuming the
clipboard data is always null terminated. This allows us to clean
up a lot of the internal handling.
|
|
|
|
|
|
| |
This is required by the protocol so we should make sure it is
enforced. We are tolerant of clients that violate this though and
convert incoming clipboard data.
|
|
|
|
|
|
| |
It is already hidden in the UI, so make sure it also is gone as a
command line parameter. This follows the behaviour of the similar
sendPrimary parameter.
|
|
|
|
|
|
|
|
|
|
| |
We always sync when we get focus, so this code path is really only
for when the server announces LED state support after we already
have focus.
Make sure we only handle this specific scenario as otherwise we
could end up syncing twice, which just toggles things back and forth
and ends up syncing incorrectly.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
We need to track different things in the server and client, so
separate things to two independent structures to keep things more
clear.
|
| |
| |
| |
| |
| |
| | |
We need to test this always in order to catch Ctrl+AltGr, and to
handle release of the key properly. Hopefully there isn't any other
case where VK_MENU is sent without a scan code.
|
|/ |
|
|
|
|
|
|
|
|
| |
For KDE we can sometimes get a bunch of stray FL_LEAVE events before
gaining focus. Sending their included button information gets things
in the incorrect order with regard to other synchronisation we do on
focus. So just ignore buttons as the only information we want out of
the leave information is a position update.
|
|
|
|
|
| |
We put the try/catch as close as possible to the writes in all
other case, so make sure this code also follows that pattern.
|
|
|
|
|
|
| |
Setting Ctrl or Alt key on menu only sends the key press, and the
state is lost when focus is lost and recovered.
This checks the menu variable and sends the keys again if needed.
|
|
|
|
|
|
| |
We should start by getting the remote end in sync with the actual
keyboard state. This would work randomly before depending on if we
got the first LED state message before or after we got focus.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
We don't want to surprise the user with unexpected clipboard changes
when vncviewer is in the background, and it is both wasteful and
possibly insecure to inform the server of every clipboard update
when the user isn't interacting with it.
|
| | |
|
| |
| |
| |
| |
| | |
Apply workaround for FLTK's bad focus handling so that we can let
Viewport handle LED synchronisation without help from DesktopWindow.
|
| |
| |
| |
| |
| | |
That way both incoming and outgoing clipboard are both in the same
place, making things clearer.
|
|/
|
|
|
|
| |
The handler is for incoming data and we should not be abusing that
class for the writer class. Do proper write prototypes for the
relevant functions.
|
|
|
|
|
| |
Improve AltGr detection even further on Windows so we can detect the
case when Ctrl and AltGr are pressed together.
|
|
|
|
|
|
| |
Try to properly detect the fake CtrlL+AltR sequence Windows sends
when pressing AltGr. This allows us to send more accurate key
events over to the server.
|
|\ |
|
| |
| |
| |
| |
| | |
The shift buttons are a bit buggy on Windows unfortunately, but we
can do slightly better than we're doing today.
|
| |
| |
| |
| |
| | |
Windows mostly follows the AT set 1 scan codes that we want, but
there are a few exceptions.
|
|/
|
|
|
| |
We've fixed the issue more properly in the server now, so remove the
workaround we had in the client.
|
| |
|
|
|
|
|
| |
Make sure it can map between the key codes of the local system
in to the key codes used by the protocol.
|
|
|
|
|
|
| |
This adds the basic infrastructure and handshake for the QEMU
Extended Key Events extension. No viewer or server makes use of
the extra functionality yet though.
|
|
|
|
|
| |
The state might have changed when we didn't have focus. Get
everything back in sync once we're back in control.
|
| |
|