From 23fea1615f05e100793a4add042e5df3fae3229e Mon Sep 17 00:00:00 2001 From: Binyamin Sagal Date: Mon, 14 Dec 2015 21:48:31 +0200 Subject: [PATCH] Fix horizontal scrolling direction and capability detection --- client/X11/xf_event.c | 4 ++-- libfreerdp/core/capabilities.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index e5d80586c..65291ac8c 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -349,13 +349,13 @@ BOOL xf_generic_ButtonPress(xfContext* xfc, int x, int y, int button, Window win case 6: /* wheel left */ wheel = TRUE; if (xfc->settings->HasHorizontalWheel) - flags = PTR_FLAGS_HWHEEL | 0x0078; + flags = PTR_FLAGS_HWHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0078; break; case 7: /* wheel right */ wheel = TRUE; if (xfc->settings->HasHorizontalWheel) - flags = PTR_FLAGS_HWHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0078; + flags = PTR_FLAGS_HWHEEL | 0x0078; break; default: diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index c1ac6d50a..32ea34dff 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -1236,13 +1236,14 @@ BOOL rdp_read_input_capability_set(wStream* s, UINT16 length, rdpSettings* setti { /* advertised by RDP 5.2, 6.0, 6.1 and 7.0 servers */ } - else if (inputFlags & TS_INPUT_FLAG_MOUSE_HWHEEL) - settings->HasHorizontalWheel = TRUE; else { /* server does not support fastpath input */ settings->FastPathInput = FALSE; } + if (inputFlags & TS_INPUT_FLAG_MOUSE_HWHEEL) { + settings->HasHorizontalWheel = TRUE; + } } return TRUE; }