Skip to content

rdp-pipewire-stream: Stop warping the mouse pointer

Pascal Nowack requested to merge pnowack/gnome-remote-desktop:no-warping into master

Quoting the main commit here:

rdp-pipewire-stream: Stop warping the mouse pointer

With the release of PipeWire-0.3.23, PipeWire fixed some screencasting
issues.
One of them is that PipeWire now always submits the mouse pointer
position correctly.
Currently, the RDP backend used the PointerPosition update to inform
the RDP client of the mouse pointer position on the server side.
The intention was that for remote assistance sessions, the user on the
client side could see the mouse pointer of the user on the server side,
when the user on the server side move the mouse.

The reality apparently is that this PDU literally means "Warp the mouse
pointer on the client side to this position".
This has several downsides:
First, the original intention of just informing the RDP client about
the mouse pointer position cannot be fulfilled any more.
Second, the RDP client should not simply move the mouse pointer bitmap,
just because the server told the client to do so.
In most situations, this is just a security issue.
Third, sending the mouse pointer position via the PointerPosition
update has another negative effect:
Depending how the RDP client handles the update, the user on the client
side can only hardly move the mouse pointer and in some cases, if the
user decides to move a window, the whole window jitters.

With PipeWire-0.3.23, this issue really becomes apparent, since
PipeWire now always carries the correct mouse pointer position, which
has the effect that a lot of PointerPosition updates happen.

So, to solve this situation, don't send any PointerPosition updates any
more that are based on the mouse pointer position of the last frame(s).
For remote assistance sessions, gnome-remote-desktop can later indicate
the mouse pointer position by blitting the current mouse pointer onto
the target surface.
Edited by Pascal Nowack

Merge request reports