| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Remove redundant arguments where the method already has access to the
relevant variable as an object attribute.
|
|
|
|
|
|
|
|
|
| |
These are often more readable as they avoid a lot of the boilerplate of
iterating over fixed arrays or STL containers.
Note that this change is very conservative to avoid noise in "git
blame". Only loops where this is a clear improvement have been
converted.
|
|
|
|
|
|
|
| |
Clients cannot remove themselves from the list as we are iterating, so
we don't need this complexity. If a client encounters a problem, it will
only mark it self as closed and will be removed from the list at a later
time.
|
|
|
|
|
| |
Let's avoid reimplementing something basic that's available in the
standard library. It also makes the code easier to read.
|
| |
|
|
|
|
|
| |
Use the new "override" keyword to properly differentiate between new
virtual methods, and existing virtual methods being overridden.
|
|
|
|
|
| |
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Run the frame clock at a slow 1 Hz if there are no clients connected.
This is similar to what a normal X server does when the screen is
blanked, and should keep applications waiting for the frame tick happy.
Note that we still only keep the frame clock running if there is any
application that are interested in it. Otherwise we still stop it
completely.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
This marks the timer as started again, before we call out to various
external places that might be confused by the frame timer reporting that
it is stopped.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Let's avoid requring these as a desktop implementation can now set up
everything in the init() method.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
They were badly formatted, way longer than the normal 72 columns.
|
| |
| |
| |
| |
| |
| | |
It currently won't ever be called with an empty list of timers, but it
is a public function so that might happen in the future. Make sure this
case is handled without crashes.
|
| |
| |
| |
| |
| | |
It is much more sane to treat "0" as "a timer is ready NOW", so let's
change to using -1 as the invalid timeout value.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Repeating a timer can be done in two ways:
* Returning true from the handler
* Calling start() again in the handler
The latter is useful if you want to change the timer interval.
If both are used, then it becomes ambiguous when the timer should fire
again.
Detect this case and warn about it. Current implementation will respect
the new interval given to start(), rather than the interval set before
running the handler.
|
| |
| |
| |
| |
| |
| |
| | |
Avoid duplicating this complexity in too many places.
At the same time make the interface more identical to regular mkdir(),
for familiarity.
|
| |
| |
| |
| |
| | |
This is an often changed database, so it is better suited for
$XDG_STATE_HOME rather than the more static $XDG_DATA_HOME.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
They must belong to the rfb namespace, not to the SConnection class.
Also add an AccessNone constant, since it's better to use a mnemonic
symbol rather than zero to initialize the accessRights members.
Signed-off-by: Carlos Santos <casantos@redhat.com>
|
| |
| |
| |
| |
| | |
It's perfectly fine to give a NULL pointer if the length has explicitly
been specified as zero.
|
| | |
|
|/ |
|
|
|
|
|
| |
It doesn't just control button events, but all types of pointer events,
including movement.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mouse events in shared connections are locked to one viewer at a time.
If the a mouse drag is happening in the first viewer, the second viewer
can't interfere unless the first viewer has been inactive for a set
amount of time. This timeout was put in place in
71c83b479335337b25dc331d3fb4a6e29382ceb5 to handle the case where the
first viewer disconnects while the mouse drag is happening. Prior to the
timeout, this resulted in all input being blocked.
This commit increases this timeout from 3 seconds to 10 seconds. This is
to minimize the risk of this happening during "normal" use. With this
change, the first viewer has to be inactive for 10 seconds before the
second viewer can take control again.
In the case where the first viewer disconnects, a waiting time of 10
seconds for the second viewer seems very reasonable.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the connection is severed, release all mouse buttons.
This fixes an issue with x0vncserver where the local display
would stop responding to mouse events if the connection closes
while the remote user was holding down a mouse button.
To reproduce, start a VNC client, press and hold a mouse button
and then kill the connection (e.g. close client, kill server,
yank network cable). This caused the local screen to no longer
respond to any mouse-down events until a VNC client reconnects
and clicks anywhere.
This may inject a "mouse release" event while closing, however,
if you click on your screen and then yank the mouse cable, a mouse
release event also would not come unexpectedly, so the cure's
side effects aren't as bad as the disease.
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
|
|\ |
|
| |
| |
| |
| | |
This make sure we have any new defines, in case we want to use them.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is mainly a copy of XKeysymToString() from libX11. We've also added
a wrapper that still gives a string, even if there is no name for the
requested keysym.
This grows the binaries a bit, but not with any extreme amount so is
hopefully worth it to get better debug logging.
|
| |
| |
| |
| | |
Otherwise it will log that we chose the (invalid) type 0.
|
|\ \
| |/
|/|
| | |
https://github.com/adamhalim/tigervnc-suite
|
| |
| |
| |
| |
| |
| | |
This change makes the ZRLEEncoder respect a client's desired
compressionLevel. The ZlibLevel option is marked deprecated and removed
from the manpages.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This permits to enable PAM for the effective user of the Xvnc process by
adding this to ~/.vnc/config or /etc/tigervnc/vncserver-config-defaults:
SecurityTypes=TLSPlain
PlainUsers=%u
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2233204
Signed-off-by: Carlos Santos <casantos@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Don't assume a lack of TCP listeners means the server will be
unreachable. There might be other methods of access, so let the higher
levels do that sanity check instead.
|
|/
|
|
| |
These aren't supported in C2x, and clang will already now complain.
|
|
|
|
|
| |
Let's log a bit more details when we need to deal with certificate
exceptions to make it easier to debug things.
|
|
|
|
|
| |
The browsers let you add an exception for this case, so we should as
well.
|
|
|
|
|
| |
GnuTLS can help use translate certificate issues in to user presentable
strings, so let's clean up that reporting.
|
|
|
|
|
| |
The browsers let you add an exception for this case, so we should as
well.
|
|
|
|
| |
This should have been done in 5f46d55.
|
|
|
|
|
| |
The browsers let you add an exception for this case, so we should as
well.
|