aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/XserverDesktop.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-14/+14
| | | | | Use the new "override" keyword to properly differentiate between new virtual methods, and existing virtual methods being overridden.
* Merge branch 'present' of github.com:CendioOssman/tigervncPierre Ossman2024-06-191-4/+9
|\
| * Add support for X Present extensionPierre Ossman2024-06-191-1/+7
| | | | | | | | | | | | | | 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.
| * Make SDesktop::start()/stop() optionalPierre Ossman2024-06-191-2/+0
| | | | | | | | | | Let's avoid requring these as a desktop implementation can now set up everything in the init() method.
| * Maintain a constant VNCServer/SDesktop connectionPierre Ossman2024-06-191-1/+2
| | | | | | | | | | | | | | | | | | The desktop isn't completely paused just because there are no clients, so it might still need some support from the server object. This is primarily an issue for headless servers, where they need to continue emulating things even without clients. A scraping server can generally go completely passive if there are no clients.
| * 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/+1
| | | | | | | | | | | | | | | | 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-3/+3
|/ | | | | | | 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>
* 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.
* Rename Input.h to vncInput.h to fix building on case-insensitive FSAlex Richardson2021-07-151-1/+1
| | | | | | | | | | | | | | I am cross-compiling from macOS for a FreeBSD-derived system so my host file system is case insensitive but the target isn't. Without this change I get the following warnings which show that the vnc "Input.h" is being included from mi/mi.h instead of the xserver "input.h": ``` In file included from /Users/alex/cheri/xvnc-server/hw/vnc/Input.c:33: /Users/alex/cheri/xvnc-server/mi/mi.h:55:10: warning: non-portable path to file '"Input.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] #include "input.h" ^~~~~~~~~ "Input.h" ```
* Add support for notifying clients about pointer movementslhchavez2021-03-021-0/+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
* Encapsulate PixelBuffer internal detailsPierre Ossman2019-11-151-1/+1
| | | | | | Don't allow subclasses to just override dimensions or buffer details directly and instead force them to go via methods. This allows us to do sanity checks on the new values and catch bugs and attacks.
* Improved clipboard APIPierre Ossman2019-07-011-3/+7
| | | | | 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.
* Properly terminate server on timeoutsPierre Ossman2018-11-091-0/+1
| | | | | | Do a proper cleanup when one of the termination timeouts trigger rather than just exiting on the spot. This makes sure we don't leave stray stuff around, e.g. unix socket files.
* Inherit SocketServer directly from VNCServerPierre Ossman2018-10-261-2/+2
| | | | | | | 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.
* Remove QueryConnectionHandlerPierre Ossman2018-10-101-5/+4
| | | | | 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-3/+2
| | | | | | 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.
* Remove Java web serverPierre Ossman2018-10-091-9/+0
| | | | | Applets don't work anymore so remove everything that has to do with serving them.
* Use abstract SocketListener classPierre Ossman2018-05-041-6/+6
| | | | | Makes the code more general and not directly tied to specifically TCP sockets.
* Removed support for building without RANDR definePeter Åstrand (astrand)2018-04-091-2/+0
| | | | | RANDR is mandatory since Xorg 1.7, which is the oldest version we support.
* Move computeScreenLayout/setScreenLayout to unixcommon libPeter Åstrand (astrand)2018-04-091-2/+1
| | | | | | These two code blocks are not specific to Xvnc/vnc.so, but useful for x0vncserver as well. RandrGlue.h defines the interface on which unixcommon depends on.
* Make vncRandRGetOutputId return the actual id; not a pointerPeter Åstrand (astrand)2018-04-091-1/+1
| | | | Less confusing, and compatible with libXrandr.
* Push query connect timeout back in to XvncPierre Ossman2017-10-041-1/+5
| | | | | | It was moved to the common code in f8e3b34c6, but it was unreliable because the state could sometimes get out of sync. Push it back in to Xvnc since it isn't necessarily something all servers will have.
* Get rid of getFbSize()/getDesktopSize() in commonPierre Ossman2017-09-221-1/+0
| | | | It was only used by WinVNC, so push it there instead.
* Basic support for QEMU Extended Key EventsPierre Ossman2017-08-281-1/+1
| | | | | | 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.
* Add support for lock LED state to Xvnc/libvnc.soPierre Ossman2017-08-241-0/+1
|
* Remove unused variable deferredUpdateTimerSetPierre Ossman2017-02-241-1/+0
|
* Merge X server block handling code pathsPierre Ossman2016-10-051-12/+10
| | | | | Use the new X server API as the reference system and emulate it on the older API. Avoids a lot of code duplication.
* Add xorg-xserver 1.19 supportHans de Goede2016-10-051-0/+7
|
* Return TcpListener pointers rather than objectsPierre Ossman2015-09-291-4/+4
| | | | | | 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.
* Fixed IPv6 support.Tim Waugh2015-03-131-4/+5
| | | | | | | | | | | | 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.
* Restructure Xvnc/libvnc.so code to avoid C++ header hacksPierre Ossman2015-01-261-38/+23
| | | | | | | | The internal Xorg headers are very incompatible with C++ and we've had to resort to all kinds of hacks in order to include them in our C++ code. This approach isn't really viable long term so restructure things so that we have a glue layer written in C that bridges the Xorg core with the RFB classes.
* Merge branch 'nocolourmap' of https://github.com/CendioOssman/tigervncPierre Ossman2014-07-141-11/+1
|\
| * Get rid of getStride()Pierre Ossman2014-07-071-2/+0
| | | | | | | | | | | | It was confusing and not properly used everywhere. Callers should use the stride they get when they get the buffer pointer.
| * Remove full support for colour mapsPierre Ossman2014-07-071-9/+1
| | | | | | | | | | | | | | | | | | 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.
* | Make InputDevice into a singletonPierre Ossman2014-07-141-1/+0
| | | | | | | | | | Xorg input devices are global so it doesn't make sense that we have one InputDevice object per XserverDesktop.
* | Let XserverDesktop handle syncing cursor positionPierre Ossman2014-07-141-0/+2
|/ | | | | This makes InputDevice cleaner and just a glue layer for Xorg input devices.
* Add back support for letting the client reconfigure the screen, this timePierre Ossman2012-07-131-0/+4
| | | | | | | | | with all the RandR 1.2 multi-head goodness. Tested with Xvnc, but should also work with libvnc.so, although it will only work for simpler cases there. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4933 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Track outputs instead of CRTCs, as those better match the screen conceptPierre Ossman2012-07-121-2/+2
| | | | | | | in RFB. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4932 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Redo the RandR code in Xvnc/libvnc to use the modern 1.2 API. The oldPierre Ossman2012-07-121-2/+12
| | | | | | | | | | | stuff was a bit buggy, and it didn't really allow us to move forward. This commit temporarily removes the ability for the client to resize the session. It will be readded for Xvnc in a later commit. libvnc will be without that functionality for now, as it is very difficult to get right there. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4931 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Fix a race condition where we might get updates thrown at us right after aPierre Ossman2012-01-231-0/+2
| | | | | | | | 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
* Reimplement the deferred update handling, this time in a more robust andPierre Ossman2011-11-081-4/+0
| | | | | | | well-behaved manner. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4784 3789f03b-4d11-0410-bbf8-ca57d06f2519
* The dummy timer isn't used anymore.Pierre Ossman2011-11-081-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4779 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Timers in RFB still weren't working properly. Do this right and check the nextPierre Ossman2011-11-071-1/+2
| | | | | | | timer just before the Xorg select() call. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4770 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Make socket writes non-blockable. This allows the system to more quicklyPierre Ossman2011-10-251-0/+2
| | | | | | | | return back to the Xorg main loop, meaning that things will be more responsive in the presence of slow VNC clients. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4735 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Development] Merge KeyboardDevice and PointerDevice classes to new class calledAdam Tkac2010-04-141-2/+1
| | | | | | | | InputDevice. It is more accordant to scheme how are input devices handled in the main X.Org sources. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4024 3789f03b-4d11-0410-bbf8-ca57d06f2519