From 4622c583322250304d68049783de2b063101549c Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 23 Jun 2021 12:45:38 +0200 Subject: [PATCH] Added extended shadow support for mouse and unicode --- server/shadow/X11/x11_shadow.c | 11 +++++++++++ server/shadow/shadow_client.c | 3 +++ 2 files changed, 14 insertions(+) diff --git a/server/shadow/X11/x11_shadow.c b/server/shadow/X11/x11_shadow.c index 772f14055..154b65279 100644 --- a/server/shadow/X11/x11_shadow.c +++ b/server/shadow/X11/x11_shadow.c @@ -300,6 +300,17 @@ static BOOL x11_shadow_input_mouse_event(rdpShadowSubsystem* subsystem, rdpShado XTestFakeButtonEvent(x11->display, button, True, (unsigned long)CurrentTime); XTestFakeButtonEvent(x11->display, button, False, (unsigned long)CurrentTime); } + else if (flags & PTR_FLAGS_HWHEEL) + { + BOOL negative = FALSE; + + if (flags & PTR_FLAGS_WHEEL_NEGATIVE) + negative = TRUE; + + button = (negative) ? 7 : 6; + XTestFakeButtonEvent(x11->display, button, True, (unsigned long)CurrentTime); + XTestFakeButtonEvent(x11->display, button, False, (unsigned long)CurrentTime); + } else { if (flags & PTR_FLAGS_MOVE) diff --git a/server/shadow/shadow_client.c b/server/shadow/shadow_client.c index 253bb610e..907b2da21 100644 --- a/server/shadow/shadow_client.c +++ b/server/shadow/shadow_client.c @@ -1785,6 +1785,9 @@ static DWORD WINAPI shadow_client_thread(LPVOID arg) UpdateEvent = shadow_multiclient_getevent(UpdateSubscriber); ChannelEvent = WTSVirtualChannelManagerGetEventHandle(client->vcm); + freerdp_settings_set_bool(settings, FreeRDP_UnicodeInput, TRUE); + freerdp_settings_set_bool(settings, FreeRDP_HasHorizontalWheel, TRUE); + freerdp_settings_set_bool(settings, FreeRDP_HasExtendedMouseEvent, TRUE); while (1) { nCount = 0;