| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This is a very limited bit field, so use an 8 bit type to clearly show
how many bits are available.
|
|
|
|
|
| |
The different uses of this interface are not that closely related and
there is no need for them to have a common interface class.
|
|
|
|
|
| |
Follow the standard XK_ prefix, and also include the hex value for
easier debugging.
|
|
|
|
|
|
| |
Instead of giving up after all free keycodes have been used, Keycodes from previously added keysyms will be reused.
Re: #93
|
|
|
|
|
| |
Remove redundant arguments where the method already has access to the
relevant variable as an object attribute.
|
|
|
|
|
| |
Let's avoid reimplementing something basic that's available in the
standard library. It also makes the code easier to read.
|
|
|
|
|
| |
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
| |
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>
|
|
|
|
| |
Make sure we can actually build without XRandR libraries.
|
|
|
|
| |
Make sure we can actually build without XFixes libraries.
|
|
|
|
| |
Make sure we can actually build without XTest libraries.
|
|
|
|
| |
The need for these must have got lost somewhere in the type cleanup.
|
|\ |
|
| |
| |
| |
| | |
It doesn't use any exceptions, so stop including the header for it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This mimics how some system functions (like inet_ntop()) work, and
avoids complexity around ownership of the returned string buffer.
The downside is that the string must be consumed directly as it will be
overwritten on the next call, but that is not an issue with the current
usage.
|
| |
| |
| |
| |
| | |
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
|
|/
|
|
|
| |
Make sure we don't send a bogus request to the X server in the (common)
case that we don't actually have anything to restore.
|
|
|
|
|
| |
This allows us to separate accidentally unused, from explicitly unused
parameters, which allows us to turn on such checks in the compiler.
|
|\ \
| | |
| | |
| | | |
https://github.com/grulja/tigervnc
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have to check whether we update cursor position/shape only in case
the cursor is on our display, otherwise in zaphod mode, ie. when having
two instances of x0vncserver on screens :0.0 and :0.1 we would be having
the cursor duplicated and actually not funcional (aka ghost cursor) as
it would be actually not present. We also additionally watch EnterNotify
and LeaveNotify events in order to show/hide cursor accordingly.
Change made with help from Olivier Fourdan <ofourdan@redhat.com>
|
|/
|
|
|
|
|
|
|
| |
We might often fail to find a matching X11 keycode when the client has
a different keyboard layout and end up with no key event. To avoid a
failure we add it as a new keysym/keycode pair so the next time a keysym
from the client that is unknown to the server is send, we will find a
match and proceed with key event. This is same behavior used in Xvnc or
x11vnc, although Xvnc has more advanced mapping from keysym to keycode.
|
|
|
|
|
|
| |
Avoid duplication, and add logging for some more error conditions so
it's possible to see in the logs why a resize has failed or produced
unexpected results.
|
|
|
|
|
|
| |
The generally recommended way is to include it from source files, not
headers. We had a mix of both. Let's try to be consistent and follow the
recommended way.
|
|
|
|
|
|
| |
We miscalculated the screen layout if the geometry had an offset as we
adjusted the real screen layout to account for the offset, but compared
it to the unadjusted geometry.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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.
|
|\ |
|
| |
| |
| |
| |
| | |
Add more checks and fix some callers to make sure that the server
core always has a valid screen layout configured.
|
| |
| |
| |
| |
| | |
We might only be using part of the X server's screen, so make sure
the layout we calculate is contained within this part.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
| |
| |
| |
| | |
Make things simpler by making this a part of the SDesktop interface
that always needs to be implemented.
|
|/
|
|
|
| |
We might have an offset in the area of the screen we're tracking,
so make sure that offset is included in the changes we report.
|
|
|
|
|
| |
We cannot assume endian-ness for the cursor we get from XFixes.
Adjust the algorithm to properly follow the specification.
|
|
|
|
|
|
|
|
| |
There are some cases where the server state will not automatically
be updated on a change. A prominent one is when only RFB attributes
were changes (e.g. the screen ID) but nothing else. In that case
there is no actual change in the X server, so it never sends any
notification about change back to us.
|
|
|
|
|
| |
x0vncserver might only be observing part of the display, so we need
to adjust any coordinates before we give them to the RFB core.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Change Xserver screen through libXrandr. For complex configurations,
all outputs must have corresponding size modes. As a special case, if
the client requests a single screen with an odd size (for example when
adjusting the size of a non-fullscreen vncviewer), find a smaller
suitable mode, and reduce the framebuffer size as well.
|
|
|
|
|
| |
It wasn't properly updated in 3112f50 when it was split off from
x0vncserver.cxx.
|
|
|
|
|
|
| |
In XDesktop::start() we allocate pixel buffer and set it as the backend to the given VNCServer.
In XDesktop::stop() we deallocate the buffer, so we must unset it from the VNCServer as well.
Otherwise the VNCServer could try to access it and crash, for example in deferred update.
|
| |
|
|
|
|
| |
Legacy systems.
|
| |
|