Merge pull request #5182 from akallabeth/mouse_hwheel_direction_fix
Mouse hwheel direction fix
This commit is contained in:
commit
6cc13303bb
@ -104,7 +104,6 @@ BOOL wlf_handle_pointer_axis(freerdp* instance, UwacPointerAxisEvent* ev)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
input = instance->input;
|
input = instance->input;
|
||||||
flags = PTR_FLAGS_WHEEL;
|
|
||||||
|
|
||||||
switch (ev->axis)
|
switch (ev->axis)
|
||||||
{
|
{
|
||||||
@ -123,7 +122,7 @@ BOOL wlf_handle_pointer_axis(freerdp* instance, UwacPointerAxisEvent* ev)
|
|||||||
direction = wl_fixed_to_int(ev->value);
|
direction = wl_fixed_to_int(ev->value);
|
||||||
flags |= 0x0078; /* TODO: Calculate the distance with the provided value size */
|
flags |= 0x0078; /* TODO: Calculate the distance with the provided value size */
|
||||||
|
|
||||||
if (direction > 0)
|
if (direction < 0)
|
||||||
flags |= PTR_FLAGS_WHEEL_NEGATIVE;
|
flags |= PTR_FLAGS_WHEEL_NEGATIVE;
|
||||||
|
|
||||||
return freerdp_input_send_mouse_event(input, flags, ev->x, ev->y);
|
return freerdp_input_send_mouse_event(input, flags, ev->x, ev->y);
|
||||||
|
@ -1043,8 +1043,8 @@ static const button_map xf_button_flags[NUM_BUTTONS_MAPPED] =
|
|||||||
{Button3, PTR_FLAGS_BUTTON2},
|
{Button3, PTR_FLAGS_BUTTON2},
|
||||||
{Button4, PTR_FLAGS_WHEEL | 0x78},
|
{Button4, PTR_FLAGS_WHEEL | 0x78},
|
||||||
{Button5, PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x78},
|
{Button5, PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x78},
|
||||||
{6, PTR_FLAGS_HWHEEL | 0x78},
|
{6, PTR_FLAGS_HWHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x78},
|
||||||
{7, PTR_FLAGS_HWHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x78},
|
{7, PTR_FLAGS_HWHEEL | 0x78},
|
||||||
{8, PTR_XFLAGS_BUTTON1},
|
{8, PTR_XFLAGS_BUTTON1},
|
||||||
{9, PTR_XFLAGS_BUTTON2},
|
{9, PTR_XFLAGS_BUTTON2},
|
||||||
{97, PTR_XFLAGS_BUTTON1},
|
{97, PTR_XFLAGS_BUTTON1},
|
||||||
|
Loading…
Reference in New Issue
Block a user