aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/vncHooks.c
Commit message (Collapse)AuthorAgeFilesLines
* Hook sprite functions instead to monitor cursorPierre Ossman2024-11-261-96/+194
| | | | | | | These are more reliably as they are called once the decision has been made as to how to display the cursor. The other hooks are sensitive to the order of extensions, which means that we can overlook cursor changes done by other extensions (e.g. hiding it).
* Handle "no cursor", not just "empty cursor"Pierre Ossman2024-11-261-5/+3
| | | | | | Some paths indicate a hidden cursor using NullCursor, and some (most) use a valid cursor that just has no contents. Make sure we can handle both cases.
* Capitalize even more logging and exceptionsPierre Ossman2024-11-221-2/+2
|
* Avoid VNC updates for offscreen windowsPierre Ossman2024-06-201-28/+41
| | | | | | | | | Windows aren't always directly shown, e.g. when the desktop is composited. We should not be sending screen updates for these as the framebuffer didn't actually change. In the case of CopyWindow, we're even sending the wrong screen data, which is how this bug was discovered.
* Properly propagate CursorWarpedTo()Pierre Ossman2024-03-141-0/+5
| | | | | Although unlikely, there might be other parts of the X server that are also interested in this call. Make sure we propagate things on properly.
* Remove vfb references from symbol namesPierre Ossman2021-07-131-1/+1
| | | | | | Xvnc was originally based on Xvfb, but it's just confusing to keep the names. So change all prefix to "vnc" instead to clearly mark things as part of TigerVNC.
* Handle X.org patch level featuresPierre Ossman2021-07-131-13/+13
| | | | | | With the 1.20.x releases there has been features and API changes even on patch level versions, so we need to update our macros to handle these as well.
* Remove #ifdef RENDERPierre Ossman2021-07-131-18/+0
| | | | | RENDER has been mandatory since xorg-server 1.9, so remove these checks.
* Add support for notifying clients about pointer movementslhchavez2021-03-021-0/+26
| | | | | | | | | | | | | | | | | | | | | | | 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
* Get rid of magical assignment to RegionPierre Ossman2020-05-181-2/+0
| | | | Might as well make these explicit so the cost is apparent.
* Avoid using RegionInit() because of empty rectsPierre Ossman2020-05-011-26/+26
| | | | | It creates an invalid region if given an empty rect. Fortunately RegionInitBoxes() handles that just fine, so use that instead.
* Stop using legacy region macrosPierre Ossman2020-05-011-125/+125
| | | | | We no longer support such old X servers so start using the current functions.
* Handle empty changes for every operationPierre Ossman2020-04-201-22/+16
| | | | | | It seems like many of the X11 operations can end up with no pixels actually changing. So instead of discovering and adding workarounds for each individually we'll just check very region added if it's empty.
* Remove legacy Xorg codePierre Ossman2020-04-021-117/+3
| | | | | We now require at least 1.16, so remove all code that handled older versions than that.
* Stop tracking changes for each glyphPierre Ossman2018-09-131-20/+34
| | | | | | We get a whole bunch of very tiny areas, which is very inefficient to deal with. Instead create a rectangle around every "list" of connected glyphs (usually each line).
* Removed support for building without RANDR definePeter Åstrand (astrand)2018-04-091-18/+0
| | | | | RANDR is mandatory since Xorg 1.7, which is the oldest version we support.
* Fix for RENDER hooks on Xorg < 1.12Pierre Ossman2018-02-051-0/+12
| | | | | TriFan and TriStrip were added in 1.12, so we need to have that code conditional to support older versions of Xorg.
* Hook remaining XRender operationsPierre Ossman2018-01-231-0/+304
| | | | We had overlooked a few so we didn't track all screen changes properly.
* Make RandR callbacks optional as they were beforeJan Grulich2017-05-041-3/+7
|
* Fix wrapping/unwrapping of X11 hooksPierre Ossman2017-02-131-126/+118
| | | | | | The functions might change so we need to also make sure we grab the updated value after each call. Clean up the code to use the same style as the rest of the Xorg code.
* Add xorg-xserver 1.19 supportHans de Goede2016-10-051-3/+18
|
* Set cursor sprite globallyPierre Ossman2016-08-181-1/+1
| | | | | Pointer are global, not screen specific. Hence so is also the cursor sprite.
* Better check for on screen visibilityPierre Ossman2016-01-111-13/+33
| | | | | | The check for visible drawables didn't account for compositing which can place a window off-screen. Put all of these checks in a common place and make sure it detects things properly.
* Gracefully handle empty CopyArea operationsPierre Ossman2015-11-301-6/+15
|
* Properly free temporary cursor bufferPierre Ossman2015-09-291-0/+2
|
* Use REGION_INTERSECT() rather than trying to compute things manuallyPierre Ossman2015-09-141-3/+13
| | | | | REGION_INIT() does not handle an empty or invalid BoxRec, so this method makes sure we don't feed bad rects further in to the process.
* Make vncHooksComposite() and vncHooksGlyphs() staticPierre Ossman2015-09-141-2/+2
| | | | They should never have been global symbols to begin with.
* Remove REGION_NULL fallbackPierre Ossman2015-09-141-7/+0
| | | | | It's been in the Xorg code base for ages. Any version that lacks it is too old for the rest of our code to work anyway.
* Remove code supporting Xorg older than 1.7Pierre Ossman2015-01-291-23/+7
|
* Restructure Xvnc/libvnc.so code to avoid C++ header hacksPierre Ossman2015-01-261-0/+2105
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.