mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
Only listen for mouse events from master devices
XInput2 has a concept of master and slave devices, where a slave device is the actual physical device, attached to a master device representing the cursor or keyboard focus. See http://who-t.blogspot.co.uk/2009/05/xi2-recipes-part-1.html Mouse events were being received from both the master and slave devices, but we are only interested in events from the master device. Fixes #533
This commit is contained in:
parent
04a651320b
commit
602a737440
|
@ -77,7 +77,7 @@ impl XInputEventHandler {
|
||||||
// X11 events.
|
// X11 events.
|
||||||
let mut mask: [libc::c_uchar; 2] = [0, 0];
|
let mut mask: [libc::c_uchar; 2] = [0, 0];
|
||||||
let mut input_event_mask = ffi::XIEventMask {
|
let mut input_event_mask = ffi::XIEventMask {
|
||||||
deviceid: ffi::XIAllDevices,
|
deviceid: ffi::XIAllMasterDevices,
|
||||||
mask_len: mask.len() as i32,
|
mask_len: mask.len() as i32,
|
||||||
mask: mask.as_mut_ptr()
|
mask: mask.as_mut_ptr()
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue