Skip to content

RDP: Some mouse wheel fixes

Quoting the relevant commit here:

session-rdp: Interpret the wheel rotation value correctly

Due to a misinterpretation of the wheel rotation value,
gnome-remote-desktop currently uses the positive wheel value as
rotation value and negates the value if the negative flag is present.
This is however not correct and the error was actually inherited from
xfreerdps and westons behaviour regarding the rotation value.
Analyzing the communication between gnome-remote-desktop and mstsc
shows however that the wheel rotation value is only correct when the
actual wheel value is positive.
For the opposite direction, mstsc (and other clients too) uses the
two's complement of the value in 9Bits.

Therefore, interpret the wheel rotation value correctly for the
negative direction, by applying the two's complement again to retrieve
the value, i.e. negate the bits in the value and add 1 to the value.
Edited by Pascal Nowack

Merge request reports