Skip to content

Commit

Permalink
Increase time required to override pointerClient
Browse files Browse the repository at this point in the history
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
71c83b4 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.
  • Loading branch information
samhed committed Jan 26, 2024
1 parent 6edbe66 commit 973a8a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/rfb/VNCServerST.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ void VNCServerST::pointerEvent(VNCSConnectionST* client,
// to provide a bit more sane user experience. But limit the time to
// prevent locking out all others when e.g. the network is down.
if ((pointerClient != NULL) && (pointerClient != client) &&
((now - pointerClientTime) < 3))
((now - pointerClientTime) < 10))
return;

pointerClientTime = now;
Expand Down

0 comments on commit 973a8a2

Please sign in to comment.