From d7798e97d1ff2ec76417fcd752c9fb873a87e8d6 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 12 Oct 2023 14:14:21 +0200 Subject: [PATCH] [client,common] prefer [MS-RDPBCGR] relative mouse prefer the standard method over custom ainput channel. --- client/common/client.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/client/common/client.c b/client/common/client.c index 8c010755b..67fcceafa 100644 --- a/client/common/client.c +++ b/client/common/client.c @@ -1538,6 +1538,8 @@ BOOL freerdp_client_send_wheel_event(rdpClientContext* cctx, UINT16 mflags) WINPR_ASSERT(cctx); + if (!freerdp_settings_get_bool(cctx->context.settings, FreeRDP_HasRelativeMouseEvent)) + { #if defined(CHANNEL_AINPUT_CLIENT) if (cctx->ainput) { @@ -1571,6 +1573,7 @@ BOOL freerdp_client_send_wheel_event(rdpClientContext* cctx, UINT16 mflags) handled = TRUE; } #endif + } if (!handled) freerdp_input_send_mouse_event(cctx->context.input, mflags, 0, 0); @@ -1599,6 +1602,11 @@ BOOL freerdp_client_send_button_event(rdpClientContext* cctx, BOOL relative, UIN WINPR_ASSERT(cctx); + if (freerdp_settings_get_bool(cctx->context.settings, FreeRDP_HasRelativeMouseEvent)) + { + return freerdp_input_send_rel_mouse_event(cctx->context.input, mflags, x, y); + } + #if defined(CHANNEL_AINPUT_CLIENT) if (cctx->ainput) { @@ -1651,6 +1659,11 @@ BOOL freerdp_client_send_extended_button_event(rdpClientContext* cctx, BOOL rela BOOL handled = FALSE; WINPR_ASSERT(cctx); + if (freerdp_settings_get_bool(cctx->context.settings, FreeRDP_HasRelativeMouseEvent)) + { + return freerdp_input_send_rel_mouse_event(cctx->context.input, mflags, x, y); + } + #if defined(CHANNEL_AINPUT_CLIENT) if (cctx->ainput) {