From 2dcc2614d4d522e491dd465ca558b20946959ee5 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 7 Jan 2019 10:01:46 +0100 Subject: [PATCH 1/2] Fixed X11 horizontal mouse wheel direction. --- client/X11/xf_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/X11/xf_client.c b/client/X11/xf_client.c index 53b58e3c6..47c854ddf 100644 --- a/client/X11/xf_client.c +++ b/client/X11/xf_client.c @@ -1043,8 +1043,8 @@ static const button_map xf_button_flags[NUM_BUTTONS_MAPPED] = {Button3, PTR_FLAGS_BUTTON2}, {Button4, PTR_FLAGS_WHEEL | 0x78}, {Button5, PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x78}, - {6, PTR_FLAGS_HWHEEL | 0x78}, - {7, PTR_FLAGS_HWHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x78}, + {6, PTR_FLAGS_HWHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x78}, + {7, PTR_FLAGS_HWHEEL | 0x78}, {8, PTR_XFLAGS_BUTTON1}, {9, PTR_XFLAGS_BUTTON2}, {97, PTR_XFLAGS_BUTTON1}, From b2ef3e69cad887fee9b065aaefe4aa41d9307bd8 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 7 Jan 2019 10:02:04 +0100 Subject: [PATCH 2/2] Fixed Wayland horizontal mouse wheel direction. --- client/Wayland/wlf_input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/Wayland/wlf_input.c b/client/Wayland/wlf_input.c index 8bb8c3af4..26879554f 100644 --- a/client/Wayland/wlf_input.c +++ b/client/Wayland/wlf_input.c @@ -104,7 +104,6 @@ BOOL wlf_handle_pointer_axis(freerdp* instance, UwacPointerAxisEvent* ev) return FALSE; input = instance->input; - flags = PTR_FLAGS_WHEEL; switch (ev->axis) { @@ -123,7 +122,7 @@ BOOL wlf_handle_pointer_axis(freerdp* instance, UwacPointerAxisEvent* ev) direction = wl_fixed_to_int(ev->value); flags |= 0x0078; /* TODO: Calculate the distance with the provided value size */ - if (direction > 0) + if (direction < 0) flags |= PTR_FLAGS_WHEEL_NEGATIVE; return freerdp_input_send_mouse_event(input, flags, ev->x, ev->y);