Pierre Ossman
9c88e0dd26
Avoid compiler "use of uninitialised variable" warnings
The compiler isn't smart enough to figure all of these out, so
restructure things a bit to avoid warnings.
5 jaren geleden
Pierre Ossman
07cbf841be
Fix multi-head placement of overlay (again)
We should be looking at the physical monitor layout, not the current
RFB layout. The latter might not be in sync with the local monitors.
5 jaren geleden
Pierre Ossman
360d107d2a
Remove dead overlay code
Remnants from an earlier version of the code.
5 jaren geleden
Pierre Ossman
29b5d84eaa
Center overlay on primary screen
Makes sure it is readable in a multi screen configuration, as otherwise
it might end up crossing multiple screens.
5 jaren geleden
Alexander Duryagin
6790199680
Increase maximum vnc server name length
5 jaren geleden
Jan Grulich
cf21a80076
Do not perform endianness check on Windows and Apple
5 jaren geleden
Jan Grulich
86cec815e4
Check endianness when constructing PlatformPixelBuffer()
5 jaren geleden
Pierre Ossman
be88293952
Ignore buttons in mouse leave events
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.
5 jaren geleden
Pierre Ossman
9fbf94db8b
Reduce size of context menu hint
It can get a bit intrusive for experienced users, so try to reduce
the impact of it.
5 jaren geleden
Pierre Ossman
8060c5acd6
Fix .gitignore for vncviewer/ and tests/
We had partial coverage for vncviewer/ already, but fix up the last
pieces.
5 jaren geleden
Pierre Ossman
e370e1c867
Fix try/catch for flushPendingClipboard()
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.
5 jaren geleden
Dominique Martinet
9f83180219
viewer: reset ctrl / alt to menu state on focus
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.
5 jaren geleden
Pierre Ossman
b08a64898b
Better string handling of default server name
We might not get one from the default configuration (we might not have
a default configuration at all), so make things more robust.
6 jaren geleden
Pierre Ossman
1d94124f68
Ignore fake focus events from XGrabKeyboard()
Grabbing (and ungrabbing) the keyboard generates fake focus events
with modern versions of Xorg. This causes an infinite loop since we
update the grab status on focus events.
Work around this by ignoring these fake events.
6 jaren geleden
Pierre Ossman
46665b6c79
Update comment about keyboard grab on focus changes
It is no longer a workaround but rather intended behaviour.
6 jaren geleden
Pierre Ossman
609a9c89e9
Properly sync LED state on connect
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.
6 jaren geleden
Pierre Ossman
cb99be55d8
Don't require server name in config file
The user might just want to load a bunch of settings and not
initiate a connection.
6 jaren geleden
Pierre Ossman
b8b3cbfc5b
Stop treating "\\\\" as a special case
Make the code simpler by handling it just like any escaped character.
6 jaren geleden
Pierre Ossman
2a85489a19
Fix parameter escape sequence parsing
We decoded "\\n" as "n" rather than "\n".
6 jaren geleden
Pierre Ossman
5d05546fe4
Add support for Unix sockets
Patch originally by Dag-Erling Smørgrav for University of Oslo.
6 jaren geleden
Mathias Jonsson
50439d78fa
Accept a cfg as an argument as an alt way to start the viewer
The user can specify a tigervnc configuration file as an argument to the
viewer. Previously the viewer assumed this to be a server, but now we
will first check if there is any file matching the given argument. If
so, try to load the content of that file, like we normally do.
Fixes issue #38 .
6 jaren geleden
Pierre Ossman
e3a2be69c4
Use abstract SocketListener class
Makes the code more general and not directly tied to specifically
TCP sockets.
6 jaren geleden
Peter Åstrand (astrand)
a890572b8d
Update fullscreen window if changing fullScreenAllMonitors option
6 jaren geleden
Pierre Ossman
59da99f650
Stop abusing InputHandler class for write class
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.
8 jaren geleden
Pierre Ossman
be6909b3c0
Avoid clipboard updates when not focused
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.
6 jaren geleden
Pierre Ossman
9a74732b5c
Add focus test helper for Viewport
6 jaren geleden
Pierre Ossman
7823629930
Handle LED state sync entirely in Viewport
Apply workaround for FLTK's bad focus handling so that we can let
Viewport handle LED synchronisation without help from DesktopWindow.
6 jaren geleden
Pierre Ossman
4c20423fb2
Move server cut text handler to Viewport
That way both incoming and outgoing clipboard are both in the same
place, making things clearer.
6 jaren geleden
Pierre Ossman
fecf0a4c79
Replace "frames" with "updates" in stats
The VNC servers aren't great at getting full frames with each update,
so avoid calling it "frames per second" in the statistics as that
can be misleading.
6 jaren geleden
Pierre Ossman
69428fe6e8
Handle Ctrl+AltGr on Windows
Improve AltGr detection even further on Windows so we can detect the
case when Ctrl and AltGr are pressed together.
6 jaren geleden
Pierre Ossman
5124978b10
Better detection of AltGr on Windows
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.
6 jaren geleden
Pierre Ossman
52d3edb13a
Fix incorrect numbers in performance debug graph
Copy paste errors/brain fart:
- Pixels do not need a factor 8 for any conversion
- Multiplying bytes by 8 gives bits, so lower case 'b', and bits
use SI prefixes, not IEC
6 jaren geleden
Samuel Mannehed
518698a28c
Update visible copyright year to 2018
6 jaren geleden
Peter Åstrand (astrand)
6011f96cdc
Rename README.txt to README.rst and convert to reStructuredText
6 jaren geleden
Peter Åstrand (astrand)
3ec76bd5eb
Don't parse FLTK arguments using Fl::arg; handle -display as other options
Fl::arg accepts several arguments which we are not documenting. Also,
it accepts a -geometry argument, which clashes with our own -geometry
option.
6 jaren geleden
Pierre Ossman
490b3198f7
Update UI look on macOS
macOS no longer uses the old Aqua look, so tweak our things to fit
in better with the current state of things.
6 jaren geleden
Peter Åstrand (astrand)
5f4972547d
Use current server time for XUngrabPointer
Similar to 841e9f32d5
but for the
pointer. Fixes a problem where the desktop environment is unresponsive
(to the mouse) after fullscreen exit; Fixes #579 .
6 jaren geleden
Pierre Ossman
d329c3ef08
Remove double cursor workaround in client
We've fixed the issue more properly in the server now, so remove the
workaround we had in the client.
6 jaren geleden
Pierre Ossman
8c2a744c23
Handle FLTK arguments at any position
E.g. vncviewer server.example.com:2 -display :2
6 jaren geleden
Pierre Ossman
727a70f038
Don't open X11 display too early
We have to wait until we've passed the command line arguments or
we might overlook a -display argument.
6 jaren geleden
Pierre Ossman
cc945566b4
Send proper keysym when Break is pressed
Ctrl+Pause sends break which results in a different VKEY on Windows.
Make sure we map that properly to the equivalent keysym.
6 jaren geleden
Pierre Ossman
30b3f926cb
Handle right shift better on Windows
The shift buttons are a bit buggy on Windows unfortunately, but we
can do slightly better than we're doing today.
6 jaren geleden
Pierre Ossman
f73214c9ea
Handle Windows scan code exceptions
Windows mostly follows the AT set 1 scan codes that we want, but
there are a few exceptions.
6 jaren geleden
Pierre Ossman
841e9f32d5
Use current server time for XUngrabKeyboard
We might be calling this outside a normal FLTK event, so we cannot
trust fl_event_time to have a sane value.
6 jaren geleden
Pierre Ossman
728b407c17
Remove accidental debug output
6 jaren geleden
Pierre Ossman
87b9d5fec9
Be explicit which Exception class we want
6 jaren geleden
Pierre Ossman
7e546febad
Release pointer grab when cursor leaves window
We don't need the grab any more if the pointer cannot click on our
window. This makes it possible to shift focus to another application
when we aren't covering all monitors.
6 jaren geleden
Pierre Ossman
5951df2416
Remove unused FLTKPixelBuffer files
These are unused since 403ac27d, but the files were never removed.
6 jaren geleden
Pierre Ossman
0c15866f0c
Add support for raw keyboard in vncviewer
Make sure it can map between the key codes of the local system
in to the key codes used by the protocol.
6 jaren geleden
Pierre Ossman
daf3d88aa1
Display security state when asking for password
Indicate to the user how secure the transport channel is so they
can avoid entering their password for untrusted sites.
6 jaren geleden