On Wayland, don't drop extra mouse buttons

This commit forwards "unknown" Wayland mouse buttons downstream via
'MouseButton::Other'. Possible values for those could be found in
<linux/input-event-codes.h>.

Also, since Wayland just forwards buttons from the kernel, which are
'u16', we must adjust 'MouseButton::Other' to take 'u16' instead of
'u8'.
This commit is contained in:
Kirill Chibisov 2020-12-09 23:11:25 +03:00 committed by GitHub
parent 8fb7aa5cef
commit c5620efc9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 10 deletions

View file

@ -745,7 +745,7 @@ pub enum MouseButton {
Left,
Right,
Middle,
Other(u8),
Other(u16),
}
/// Describes a difference in the mouse scroll wheel state.