From 269002f0a15ab9040d37dea1bb7aabb69586e834 Mon Sep 17 00:00:00 2001 From: Mariusz Zaborski Date: Tue, 11 Dec 2018 13:34:31 +0100 Subject: [PATCH] Respect settings while sending the input capabilities. --- libfreerdp/core/capabilities.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libfreerdp/core/capabilities.c b/libfreerdp/core/capabilities.c index c33301281..1807b0ec9 100644 --- a/libfreerdp/core/capabilities.c +++ b/libfreerdp/core/capabilities.c @@ -1309,8 +1309,7 @@ static BOOL rdp_write_input_capability_set(wStream* s, rdpSettings* settings) return FALSE; header = rdp_capability_set_start(s); - inputFlags = INPUT_FLAG_SCANCODES | INPUT_FLAG_MOUSEX | INPUT_FLAG_UNICODE | - TS_INPUT_FLAG_MOUSE_HWHEEL; + inputFlags = INPUT_FLAG_SCANCODES; if (settings->FastPathInput) { @@ -1318,6 +1317,15 @@ static BOOL rdp_write_input_capability_set(wStream* s, rdpSettings* settings) inputFlags |= INPUT_FLAG_FASTPATH_INPUT2; } + if (settings->HasHorizontalWheel) + inputFlags |= TS_INPUT_FLAG_MOUSE_HWHEEL; + + if (settings->UnicodeInput) + inputFlags |= INPUT_FLAG_UNICODE; + + if (settings->HasExtendedMouseEvent) + inputFlags |= INPUT_FLAG_MOUSEX; + Stream_Write_UINT16(s, inputFlags); /* inputFlags (2 bytes) */ Stream_Write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */ Stream_Write_UINT32(s, settings->KeyboardLayout); /* keyboardLayout (4 bytes) */