From 602a737440ae050e7725cb7c1f2dd31e97bf70e0 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Wed, 22 Jul 2015 06:40:06 +0100 Subject: 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 --- src/api/x11/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/api/x11/input.rs b/src/api/x11/input.rs index 25add95..34ba33a 100644 --- a/src/api/x11/input.rs +++ b/src/api/x11/input.rs @@ -77,7 +77,7 @@ impl XInputEventHandler { // X11 events. let mut mask: [libc::c_uchar; 2] = [0, 0]; let mut input_event_mask = ffi::XIEventMask { - deviceid: ffi::XIAllDevices, + deviceid: ffi::XIAllMasterDevices, mask_len: mask.len() as i32, mask: mask.as_mut_ptr() }; -- cgit v1.2.3