aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/x11
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2015-08-24 15:42:10 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2015-08-27 06:52:32 -0700
commit576720fd9767e579d79e7dbf933ef819de8e1a5e (patch)
treec7c51b1a0cb5d2b1e78b05cdd15978266603364f /src/api/x11
parentc310f7bb803dda17467a353edf903d68c82fcfe4 (diff)
downloadglutin-576720fd9767e579d79e7dbf933ef819de8e1a5e.tar.gz
glutin-576720fd9767e579d79e7dbf933ef819de8e1a5e.zip
Read scroll axis info from all devices
When multiple scrolling devices are attached, XIAllMasterDevices does not include the scroll axes for all hardware devices.
Diffstat (limited to 'src/api/x11')
-rw-r--r--src/api/x11/input.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/x11/input.rs b/src/api/x11/input.rs
index 75939e9..388b651 100644
--- a/src/api/x11/input.rs
+++ b/src/api/x11/input.rs
@@ -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)) };