mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Read scroll axis info from all devices
When multiple scrolling devices are attached, XIAllMasterDevices does not include the scroll axes for all hardware devices.
This commit is contained in:
parent
c310f7bb80
commit
576720fd97
|
@ -268,10 +268,9 @@ fn read_input_axis_info(display: &Arc<XConnection>) -> Vec<Axis> {
|
|||
let mut axis_list = Vec::new();
|
||||
let mut device_count = 0;
|
||||
|
||||
// only get events from the master devices which are 'attached'
|
||||
// to the keyboard or cursor
|
||||
// Check all input devices for scroll axes.
|
||||
let devices = unsafe{
|
||||
(display.xinput2.XIQueryDevice)(display.display, ffi::XIAllMasterDevices, &mut device_count)
|
||||
(display.xinput2.XIQueryDevice)(display.display, ffi::XIAllDevices, &mut device_count)
|
||||
};
|
||||
for i in 0..device_count {
|
||||
let device = unsafe { *(devices.offset(i as isize)) };
|
||||
|
|
Loading…
Reference in a new issue