Implemented horizontal wheel support.
Horizontal mouse wheel input capabilities are now checked and if available mouse buttons 6 and 7 are mapped to the horizontal wheel for the X11 client.
This commit is contained in:
parent
d81784cec6
commit
a5db7117c8
@ -331,7 +331,7 @@ BOOL xf_generic_ButtonPress(xfContext* xfc, int x, int y, int button, Window win
|
||||
|
||||
case 5:
|
||||
wheel = TRUE;
|
||||
flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
|
||||
flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0078;
|
||||
break;
|
||||
|
||||
case 8: /* back */
|
||||
@ -346,8 +346,17 @@ BOOL xf_generic_ButtonPress(xfContext* xfc, int x, int y, int button, Window win
|
||||
flags = PTR_XFLAGS_DOWN | PTR_XFLAGS_BUTTON2;
|
||||
break;
|
||||
|
||||
//TODO handle: case 6: /* wheel left or back */
|
||||
//TODO handle: case 7: /* wheel right or forward */
|
||||
case 6: /* wheel left */
|
||||
wheel = TRUE;
|
||||
if (xfc->settings->HasHorizontalWheel)
|
||||
flags = PTR_FLAGS_HWHEEL | 0x0078;
|
||||
break;
|
||||
|
||||
case 7: /* wheel right */
|
||||
wheel = TRUE;
|
||||
if (xfc->settings->HasHorizontalWheel)
|
||||
flags = PTR_FLAGS_HWHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0078;
|
||||
break;
|
||||
|
||||
default:
|
||||
x = 0;
|
||||
|
@ -35,6 +35,7 @@ typedef struct rdp_input rdpInput;
|
||||
#define KBD_FLAGS_RELEASE 0x8000
|
||||
|
||||
/* Pointer Flags */
|
||||
#define PTR_FLAGS_HWHEEL 0x0400
|
||||
#define PTR_FLAGS_WHEEL 0x0200
|
||||
#define PTR_FLAGS_WHEEL_NEGATIVE 0x0100
|
||||
#define PTR_FLAGS_MOVE 0x0800
|
||||
|
@ -1232,7 +1232,8 @@ struct rdp_settings
|
||||
ALIGN64 BOOL MultiTouchInput; /* 2631 */
|
||||
ALIGN64 BOOL MultiTouchGestures; /* 2632 */
|
||||
ALIGN64 UINT32 KeyboardHook; /* 2633 */
|
||||
UINT64 padding2688[2688 - 2634]; /* 2634 */
|
||||
ALIGN64 BOOL HasHorizontalWheel; /* 2634 */
|
||||
UINT64 padding2688[2688 - 2635]; /* 2635 */
|
||||
|
||||
/* Brush Capabilities */
|
||||
ALIGN64 UINT32 BrushSupportLevel; /* 2688 */
|
||||
|
@ -1236,6 +1236,8 @@ BOOL rdp_read_input_capability_set(wStream* s, UINT16 length, rdpSettings* setti
|
||||
{
|
||||
/* advertised by RDP 5.2, 6.0, 6.1 and 7.0 servers */
|
||||
}
|
||||
else if (inputFlags & TS_INPUT_FLAG_MOUSE_HWHEEL)
|
||||
settings->HasHorizontalWheel = TRUE;
|
||||
else
|
||||
{
|
||||
/* server does not support fastpath input */
|
||||
@ -1261,7 +1263,7 @@ void rdp_write_input_capability_set(wStream* s, rdpSettings* settings)
|
||||
|
||||
header = rdp_capability_set_start(s);
|
||||
|
||||
inputFlags = INPUT_FLAG_SCANCODES | INPUT_FLAG_MOUSEX | INPUT_FLAG_UNICODE;
|
||||
inputFlags = INPUT_FLAG_SCANCODES | INPUT_FLAG_MOUSEX | INPUT_FLAG_UNICODE | TS_INPUT_FLAG_MOUSE_HWHEEL;
|
||||
|
||||
if (settings->FastPathInput)
|
||||
{
|
||||
|
@ -98,6 +98,8 @@
|
||||
#define INPUT_FLAG_FASTPATH_INPUT 0x0008
|
||||
#define INPUT_FLAG_UNICODE 0x0010
|
||||
#define INPUT_FLAG_FASTPATH_INPUT2 0x0020
|
||||
#define TS_INPUT_FLAG_MOUSE_HWHEEL 0x0100
|
||||
#define TS_INPUT_FLAG_QOE_TIMESTAMPS 0x0200
|
||||
|
||||
/* Font Support Flags */
|
||||
#define FONTSUPPORT_FONTLIST 0x0001
|
||||
|
Loading…
Reference in New Issue
Block a user