From 2da892ccf69fb06c3986c0cc50324226e55b820d Mon Sep 17 00:00:00 2001 From: Naruhito Date: Sun, 26 Nov 2023 20:31:17 +0900 Subject: [PATCH] Proxy extended mouse button 8, 9 events https://github.com/neutrinolabs/xrdp/pull/2860#issuecomment-1818705074 --- neutrinordp/xrdp-neutrinordp.c | 36 ++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/neutrinordp/xrdp-neutrinordp.c b/neutrinordp/xrdp-neutrinordp.c index 3991346689..adb93d1ff9 100644 --- a/neutrinordp/xrdp-neutrinordp.c +++ b/neutrinordp/xrdp-neutrinordp.c @@ -425,24 +425,36 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2, case 110: break; - case 115: /* side back button up (multi-device mouse) */ - mod->inst->input->KeyboardEvent(mod->inst->input, 0x4000, 0x38); //Alt down - mod->inst->input->KeyboardEvent(mod->inst->input, 0x4100, 0x4B); //Left down - mod->inst->input->KeyboardEvent(mod->inst->input, 0x8100, 0x4B); //Left up - mod->inst->input->KeyboardEvent(mod->inst->input, 0x8000, 0x38); //Alt up + case 115: /* extended mouse button8 up */ + LOG_DEVEL(LOG_LEVEL_DEBUG, "extended mouse button8 up %ld %ld", param1, param2); + x = param1; + y = param2; + flags = PTR_XFLAGS_BUTTON1; + mod->inst->input->ExtendedMouseEvent(mod->inst->input, flags, x, y); break; - case 116: /* side back button down (multi-device mouse) */ + case 116: /* extended mouse button8 down */ + LOG_DEVEL(LOG_LEVEL_DEBUG, "extended mouse button8 down %ld %ld", param1, param2); + x = param1; + y = param2; + flags = PTR_XFLAGS_BUTTON1 | PTR_XFLAGS_DOWN; + mod->inst->input->ExtendedMouseEvent(mod->inst->input, flags, x, y); break; - case 117: /* side forward button up (multi-device mouse) */ - mod->inst->input->KeyboardEvent(mod->inst->input, 0x4000, 0x38); //Alt down - mod->inst->input->KeyboardEvent(mod->inst->input, 0x4100, 0x4D); //Right down - mod->inst->input->KeyboardEvent(mod->inst->input, 0x8100, 0x4D); //Right up - mod->inst->input->KeyboardEvent(mod->inst->input, 0x8000, 0x38); //Alt up + case 117: /* extended mouse button9 up */ + LOG_DEVEL(LOG_LEVEL_DEBUG, "extended mouse button9 up %ld %ld", param1, param2); + x = param1; + y = param2; + flags = PTR_XFLAGS_BUTTON2; + mod->inst->input->ExtendedMouseEvent(mod->inst->input, flags, x, y); break; - case 118: /* side forward button down (multi-device mouse) */ + case 118: /* extended mouse button9 down */ + LOG_DEVEL(LOG_LEVEL_DEBUG, "extended mouse button9 down %ld %ld", param1, param2); + x = param1; + y = param2; + flags = PTR_XFLAGS_BUTTON2 | PTR_XFLAGS_DOWN; + mod->inst->input->ExtendedMouseEvent(mod->inst->input, flags, x, y); break; case 200: