Major restructuring of how streams work. Neither input nor output
streams are now blocking. This avoids stalling the rest of the client or
server when a peer is slow or unresponsive.
Note that this puts an extra burden on users of streams to make sure
they are allowed to do their work once the underlying transports are
ready (e.g. monitoring fds).
It doesn't belong on each socket server object as timers are global.
Force implementations to call the Timer system directly instead,
avoiding any middle men.
Force queryConnection() to always call back to approveConnection()
rather than return special values. This makes the flow easier to
follow as it will be the same in all cases.
x0vncserver: keyEvent(): use scancodes if available
Use the client provided (using QEMU extendend key event) scancodes if
available instead of reverse mapping the keysym.
X11 unfortunately uses keyboard driver specific keycodes and provides
no direct way to query this, so guess based on the keyboard mapping.
Handle the two most likely keyboard drivers, the old xorgkbd and evdev.
Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
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.
x0vncserver: add support for led state notifications
Listen for XKb XkbIndicatorStateNotify events for scroll/num/caps lock and
map them to the RFB protocol.
Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
Using XKeysymToKeycode() often gives the incorrect keycode as it
doesn't respect the current modifier state. Use XKB to find the
proper key instead.
This however also means that we need to track the mapping for all
pressed keys to make sure we know the correct keycode when it is
time to release the key.
x0vncserver: Use Xfixes to display cursors if available
https://github.com/TigerVNC/tigervnc/issues/361
This is a simple implementation that refetches and transforms the cursor
image every time it changes, and doesn't use the cursor naming functions
of the XFixes extension to save & cache cursor images.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
It is easier to control object life time and avoid magical socket
duplication by having a single TcpListener object to pass around.
We have to be more careful about deleting the object though.
The TcpListener constructor now takes a 'struct sockaddr*' instead of
a string, and the createTcpListeners function creates TcpListener
instances for an address based on the results from getaddrinfo().
The XserverDesktop class now takes a list of TcpListener instances for
each of the RFB and HTTP sockets.
The TcpListener::closeFd member variable is not used and has been
removed.
Gets rid of a loooot of code and complexity.
Colour map clients are still supported through an
automatically generated map, but we lose the ability to
develop a client or server that uses colour maps
internally.
Remove the "video" feature and its associated custom JPEG handling.
Having the client specifiy the video region is conceptually wrong
and a problem like this should be handled by better encoding selection.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3635 3789f03b-4d11-0410-bbf8-ca57d06f2519
[Bugfix] When terminating x0vncserver by pressing Ctrl+C in a remote viewer, x0vncserver used to leave the Ctrl modifier "pressed". Now it should be "released" properly.
[Enhancements, refactoring] Rationalized functions to control video
rectangle selection and default video rectangle. Added more logging and
improved error checking in the related code.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2753 3789f03b-4d11-0410-bbf8-ca57d06f2519
Passing VideoArea parameter to VNCServerST object. VNCServerST saves the
rectangle but does not use it yet.
does not do anything more.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2692 3789f03b-4d11-0410-bbf8-ca57d06f2519
Implemented support for command-line options that print version information
on stdout: -version, --version and -v are all equivalent.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2578 3789f03b-4d11-0410-bbf8-ca57d06f2519
Code refactoring: PollingManager should not know anything about
XPixelBuffer. This commit partially reverts the changes from r2567.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2575 3789f03b-4d11-0410-bbf8-ca57d06f2519