mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
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:
@@ -1307,7 +1307,7 @@ unsafe extern "system" fn public_window_callback<T: 'static>(
|
||||
event: MouseInput {
|
||||
device_id: DEVICE_ID,
|
||||
state: Pressed,
|
||||
button: Other(xbutton as u8),
|
||||
button: Other(xbutton),
|
||||
modifiers: event::get_key_mods(),
|
||||
},
|
||||
});
|
||||
@@ -1329,7 +1329,7 @@ unsafe extern "system" fn public_window_callback<T: 'static>(
|
||||
event: MouseInput {
|
||||
device_id: DEVICE_ID,
|
||||
state: Released,
|
||||
button: Other(xbutton as u8),
|
||||
button: Other(xbutton),
|
||||
modifiers: event::get_key_mods(),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user