Pass buttons state in scroll events

A scroll event might be produced when a mouse button is pressed (for
example when scrolling while selecting a text). For consistency, pass
the actual buttons state (instead of 0).

In practice, it seems that this use case does not work properly with
Android event injection, but it will work with HID mouse.
This commit is contained in:
Romain Vimont
2021-12-31 10:38:05 +01:00
parent 7121a0dc53
commit 924375487e
10 changed files with 24 additions and 11 deletions

View File

@@ -360,6 +360,7 @@ struct sc_mouse_scroll_event {
struct sc_position position;
int32_t hscroll;
int32_t vscroll;
uint8_t buttons_state; // bitwise-OR of sc_mouse_button values
};
struct sc_mouse_motion_event {