diff options
author | Jason Gerecke <killertofu@gmail.com> | 2018-02-09 08:14:41 -0800 |
---|---|---|
committer | David Fort <contact@hardening-consulting.com> | 2018-02-21 16:14:46 +0100 |
commit | 9fc2e461b37ddc534146adb6f754d8f68e354f10 (patch) | |
tree | 311cdf47cc2be3c5916c4e7c1fbf91fc89acb979 | |
parent | 1f7817613ac632a0c078454460df5be89f1f6144 (diff) | |
download | weston-9fc2e461b37ddc534146adb6f754d8f68e354f10.tar.gz |
compositor-rdp: Correct mouse scrolling direction
The direction of scrolling in the RDP compositor appears to be inverted.
When using Weston directly in X, sending X11 button 4 cuases window
contents to scroll up and button 4 to be reported to xwayland clients.
Conversely, when using Weston through RDP (xfreerdp client), sending
X11 button 4 causes window contents to scroll down and button 5 to be
reported to xwayland clients. The xfreerdp client does not seem to be
the cause of this since scrolling works correctly when connecting to
a Windows host.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: David Fort <contact@hardening-consulting.com>
-rw-r--r-- | libweston/compositor-rdp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c index 4a4dc696..ee68e969 100644 --- a/libweston/compositor-rdp.c +++ b/libweston/compositor-rdp.c @@ -1062,7 +1062,7 @@ xf_mouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y) * * https://blogs.msdn.microsoft.com/oldnewthing/20130123-00/?p=5473 explains the 120 value */ - value = (flags & 0xff) / 120.0; + value = -(flags & 0xff) / 120.0; if (flags & PTR_FLAGS_WHEEL_NEGATIVE) value = -value; |