diff --git a/common/xrdp_constants.h b/common/xrdp_constants.h index 231d494ab9..809ede4c53 100644 --- a/common/xrdp_constants.h +++ b/common/xrdp_constants.h @@ -263,6 +263,12 @@ #define WM_LBUTTONDOWN 102 #define WM_RBUTTONUP 103 #define WM_RBUTTONDOWN 104 +/* Alternative definitions needed for buttons 1 and 2 - + * FreeRDP silently redefines the above ones */ +#define WM_BUTTON1UP 101 +#define WM_BUTTON1DOWN 102 +#define WM_BUTTON2UP 103 +#define WM_BUTTON2DOWN 104 #define WM_BUTTON3UP 105 #define WM_BUTTON3DOWN 106 #define WM_BUTTON4UP 107 diff --git a/neutrinordp/xrdp-neutrinordp.c b/neutrinordp/xrdp-neutrinordp.c index 859b29b586..23a45e632d 100644 --- a/neutrinordp/xrdp-neutrinordp.c +++ b/neutrinordp/xrdp-neutrinordp.c @@ -359,7 +359,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2, mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); break; - case WM_LBUTTONUP: + case WM_BUTTON1UP: LOG_DEVEL(LOG_LEVEL_DEBUG, "left button up %ld %ld", param1, param2); x = param1; y = param2; @@ -367,7 +367,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2, mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); break; - case WM_LBUTTONDOWN: + case WM_BUTTON1DOWN: LOG_DEVEL(LOG_LEVEL_DEBUG, "left button down %ld %ld", param1, param2); x = param1; y = param2; @@ -375,7 +375,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2, mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); break; - case WM_RBUTTONUP: + case WM_BUTTON2UP: LOG_DEVEL(LOG_LEVEL_DEBUG, "right button up %ld %ld", param1, param2); x = param1; y = param2; @@ -383,7 +383,7 @@ lxrdp_event(struct mod *mod, int msg, long param1, long param2, mod->inst->input->MouseEvent(mod->inst->input, flags, x, y); break; - case WM_RBUTTONDOWN: + case WM_BUTTON2DOWN: LOG_DEVEL(LOG_LEVEL_DEBUG, "right button down %ld %ld", param1, param2); x = param1; y = param2;