aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/VNCServerST.h
Commit message (Collapse)AuthorAgeFilesLines
* Add server support for forward/back mouse buttonsAdam Halim2024-10-221-1/+1
| | | | | | | | | This commit adds support for the pseudo-encoding ExtendedMouseButtons in Xvnc and x0vncserver, which makes it possible to use to use the back/forward mouse buttons. This commit contains work originally done by PixelSmith <manny33@frontbuffer.com>.
* Better type for pointer button maskPierre Ossman2024-08-121-1/+1
| | | | | This is a very limited bit field, so use an 8 bit type to clearly show how many bits are available.
* Mark overridden virtual functionsPierre Ossman2024-06-241-35/+35
| | | | | Use the new "override" keyword to properly differentiate between new virtual methods, and existing virtual methods being overridden.
* Use nullptr in all C++ codePierre Ossman2024-06-241-1/+1
| | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
* Merge branch 'present' of github.com:CendioOssman/tigervncPierre Ossman2024-06-191-1/+4
|\
| * Keep frame clock running if waiting for frame tickPierre Ossman2024-06-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | If there is something interested in synchronizing to a frame tick, then keep the frame clock running, even if there are no updates. This is need mainly when something starts rendering, but also when something renders much slower than the frame clock (so it is essentially constantly "starting"). Such an application will not draw anything until it gets a new frame tick, which it won't get as the frame clock is waiting for something to start drawing.
| * Add support for X Present extensionPierre Ossman2024-06-191-0/+2
| | | | | | | | | | | | | | This makes it possible for applications to synchronize their updates to the updates sent out to clients. This avoids tearing, and could in the future also help with rate limiting applications to what the client can actually show.
| * Explicitly request timer repetitionPierre Ossman2024-06-191-1/+1
| | | | | | | | | | | | One-shot timers are more common, so let's change the API a bit to make that use case simpler. This API also makes it more clear what is happening.
* | vncconfig: add option to force view-only remote client connectionsCarlos Santos2024-04-261-1/+2
| | | | | | | | | | | | | | | | Specifies that the server must ignore all keyboard or mouse events sent by the client. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2180903 Signed-off-by: Carlos Santos <casantos@redhat.com>
* | Remove the network::SocketServer interface.Carlos Santos2024-04-261-4/+1
|/ | | | | | | Move these RFB specific things to rfb::VNCServer, for clarity. Signed-off-by: Pierre Ossman <ossman@cendio.se> Signed-off-by: Carlos Santos <casantos@redhat.com>
* VNCServerST: Add a timeout to pointer button ownershipMike Looijmans2024-01-221-0/+2
| | | | | | | | | | | | | | | | | | | When one clients holds down a button on the pointer device (probably dragging something), other clients' attempts at pointer operations are denied. This yields a sane user experience, but with limits. When one clients starts dragging, and then his network connection fails, other clients are denied access to the pointer until the VNC server finally discovers that the connection is dead and closes it. This can take about 15 minutes. Add a timeout to this policy: If we don't hear from the client for 3 seconds, other clients are allowed to control the pointer once more. This solves the problem that one failing network could make the server completely deaf to other clients for a long time. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
* Use std::string instead of CharArrayPierre Ossman2023-02-041-2/+2
| | | | | Let's use a more common type instead of something homegrown. Should be more familiar to new developers.
* Use stdint typesPierre Ossman2023-02-011-2/+2
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Add support for notifying clients about pointer movementslhchavez2021-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This change adds support for the VMware Mouse Position pseudo-encoding[1], which is used to notify VNC clients when X11 clients call `XWarpPointer()`[2]. This function is called by SDL (and other similar libraries) when they detect that the server does not support native relative motion, like some RFB clients. With this, RFB clients can choose to adjust the local cursor position under certain circumstances to match what the server has set. For instance, if pointer lock has been enabled on the client's machine and the cursor is not being drawn locally, the local position of the cursor is irrelevant, so the RFB client can use what the server sends as the canonical absolute position of the cursor. This ultimately enables the possibility of games (especially FPS games) to behave how users expect (if the clients implement the corresponding change). Part of: #619 1: https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#vmware-cursor-position-pseudo-encoding 2: https://tronche.com/gui/x/xlib/input/XWarpPointer.html 3: https://hg.libsdl.org/SDL/file/28e3b60e2131/src/events/SDL_mouse.c#l804
* Improved clipboard APIPierre Ossman2019-07-011-3/+11
| | | | | Change the internal clipboard API to use a request based model in order to be prepared for more advanced clipboard transfers.
* Clean up internal clipboard handlingPierre Ossman2019-07-011-2/+2
| | | | | | 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.
* Get rid of SocketServer::checkTimeouts()Pierre Ossman2018-11-091-6/+0
| | | | | | 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.
* Change exit timeouts to timersPierre Ossman2018-11-091-3/+3
| | | | | | This makes them more consistent with everything else, which makes things clearer and also allows them to handle some corner cases (e.g. only firing once).
* Clean up headersPierre Ossman2018-11-091-10/+13
| | | | Add missing comments and clearly separate methods from attributes.
* Remove unused functions from server classesPierre Ossman2018-11-091-9/+0
|
* Move ListConnInfo to WinVNC directoryPierre Ossman2018-11-091-8/+0
| | | | | It is functionality specific to WinVNC, so move the code there to make things more clear.
* Inherit SocketServer directly from VNCServerPierre Ossman2018-10-261-3/+1
| | | | | | | This makes VNCServer a sufficiently complete interface that callers don't need to know about the specific implementation (VNCServerST currently). And assuming that all servers will use sockets is not that outrageous.
* Encapsulate client handling in VNCServerSTPierre Ossman2018-10-261-14/+18
| | | | | | Removed the last parts of VNCSConnectionST's back door in to VNCServerST and let the parent class fully handle coordination of clients, and access to the desktop.
* Move access rights and closing to SConnection objectPierre Ossman2018-10-101-5/+1
| | | | | This makes it generally useful and other code doesn't have to know of the specific sub-class.
* Encapsulate setDesktopSize() in VNCServerSTPierre Ossman2018-10-101-2/+4
| | | | | More encapsulation of functions that require coordinate between clients.
* Encapsulate event handling in VNCServerSTPierre Ossman2018-10-101-0/+5
| | | | | | There is some client coordination needed which is better encapsulated inside VNCServerST. This also helps hiding the desktop from the individual clients.
* Use accessor methods for VNCServerSTPierre Ossman2018-10-101-10/+10
| | | | | Avoid having VNCSConnectionST poking around in VNCServerST's internals and instead access things via safer methods.
* Remove QueryConnectionHandlerPierre Ossman2018-10-101-35/+6
| | | | | Make things simpler by making this a part of the SDesktop interface that always needs to be implemented.
* Force common flow of connection queriesPierre Ossman2018-10-091-15/+10
| | | | | | 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.
* Send lossless refresh even with pending updatesPierre Ossman2018-03-281-1/+1
| | | | | | There might be parts of the screen that haven't changed and can therefore be refreshed. Figure which parts these are and send just those.
* Limit lossless refresh update to safe sizePierre Ossman2018-03-281-0/+1
| | | | | | We don't want to waste bandwidth on the lossless refresh if we might need that bandwidth for a normal update. Try to estimate how much data we can safely send without interfering.
* Avoid checking updates when desktop is stoppedPierre Ossman2018-03-281-0/+1
| | | | | | | | No need to run all the update machinery when there is no client connected. This commit also cleans up the stop handling a bit by moving it to its own method.
* Merge branch 'congestion' of https://github.com/CendioOssman/tigervncPierre Ossman2018-02-261-2/+1
|\
| * Reduce header dependencies in server classesPierre Ossman2017-11-171-2/+1
| |
* | Get rid of getFbSize()/getDesktopSize() in commonPierre Ossman2017-09-221-4/+0
| | | | | | | | It was only used by WinVNC, so push it there instead.
* | Add server side lock key sync heuristicPierre Ossman2017-08-241-0/+2
|/ | | | Based on QEMU's behaviour.
* Merge branch 'fps' of https://github.com/CendioOssman/tigervncPierre Ossman2017-02-241-6/+6
|\
| * Send updates with a fixed intervalPierre Ossman2017-02-241-6/+4
| | | | | | | | | | | | | | | | This redesigns the old "deferred updates" mechanism in to a frame clock that governs how often updates are sent out. The goal is still the same, to aggregate updates and avoid pointless updates, all in the name of efficiency. This model should however be more robust against delays that sometimes causes us to miss the desired rate.
| * Only update rendered cursor when requestedPierre Ossman2017-02-241-0/+2
| |
* | Change cursor API to use RGBA dataPierre Ossman2017-02-221-2/+2
|/ | | | | This will allow us to use better formats that preserve the entire alpha channel.
* Move getSockets() to SocketServer interfacePierre Ossman2016-10-051-7/+4
| | | | | Any caller using add or remove should also be able to list the sockets.
* Move socket write event handling in to the RFB corePierre Ossman2016-04-291-2/+6
| | | | | | What to do when a socket is writeable should be handled in the RFB core code as there may be other events we want to fire off when this happens.
* Use PixelBuffer objects as the interface for encoders and decodersPierre Ossman2014-07-141-8/+1
| | | | | | | This avoid a lot of unnecessary middle men. This also pushes the responsibility for pixel format conversion into the encoders and decoders. The new bufferFromBuffer() is used for direct conversion, rather than PixelTransformer/TransImageGetter.
* Add helper class for a rendered cursorPierre Ossman2014-07-141-3/+1
| | | | | | Add a magical cursor framebuffer class for handling when you want to render the cursor on the server side. Keeps the cursor specific magic in one contained place.
* Get rid of the direct access abuse of FullFramePixelBuffer's dataPierre Ossman2014-07-071-1/+1
|
* Remove full support for colour mapsPierre Ossman2014-07-071-1/+0
| | | | | | | | | 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.
* Fix a race condition where we might get updates thrown at us right after aPierre Ossman2012-01-231-0/+3
| | | | | | | | framebuffer switch, but before we've been given the pointer to the new framebuffer. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4839 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Make the comparing update tracker a bit more flexible. It can now be in anPierre Ossman2011-11-201-0/+2
| | | | | | | | | "auto" state where it will be enabled until we deem that the client is better of without it (currently triggered by explicitly stating a low compression level). git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4809 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Reimplement the deferred update handling, this time in a more robust andPierre Ossman2011-11-081-3/+19
| | | | | | | well-behaved manner. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4784 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Clean up the interface for VNCSConnectionST. Entry points are more apparentPierre Ossman2011-11-071-1/+0
| | | | | | | and the data flow is now more strictly aimed towards this connection class. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4771 3789f03b-4d11-0410-bbf8-ca57d06f2519