aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/x11/input.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add phases to wheel events.Patrick Walton2016-03-031-2/+3
| | | | Needed for apps to support overscroll on the Mac.
* x11: Prevent leak on XIQueryDeviceEmilio Cobos Álvarez2016-01-061-2/+6
| | | | | | | Per http://linux.die.net/man/3/xiquerydevice: > XIFreeDeviceInfo frees the information returned by > XIQueryDevice.
* Change X11 events based on `multitouch` optionMatt Brubeck2015-10-231-3/+19
| | | | | * If `multitouch` is enabled, touch input generates touch events. * If `multitouch` is disabled, touch input generates emulated mouse events.
* Read scroll axis info from all devicesMatt Brubeck2015-08-271-3/+2
| | | | | When multiple scrolling devices are attached, XIAllMasterDevices does not include the scroll axes for all hardware devices.
* Take XIScrollClassInfo::increment into accountMatt Brubeck2015-08-241-7/+9
| | | | | | | | | | | | | | | | | | | | | | | From the "Smooth Scrolling" section of [XI2Proto.txt][1]: > One unit of scrolling in either direction is considered to be equivalent to > one button event, e.g. for a unit size of 1.0, -2.0 on an valuator type > Vertical sends two button press/release events for button 4. Likewise, a > button press event for button 7 generates an event on the Horizontal > valuator with a value of +1.0. The server may accumulate deltas of less than > one unit of scrolling. From [What's new in XI 2.1 - smooth scrolling][2]: > The increment defines what delta the driver considers to be one scroll > event. For an increment of +5, each delta of 5 should be regarded as one > scroll unit down. For an increment of -3, each delta of 3 should be regarded > as one scroll unit up (i.e. inverted). [1]: http://www.x.org/releases/X11R7.7/doc/inputproto/XI2proto.txt [2]: http://who-t.blogspot.com/2011/09/whats-new-in-xi-21-smooth-scrolling.html This fixes scrolling with my Microsoft mouse in X11 on Debian 8.1.
* Handle touch events on X11Matt Brubeck2015-08-181-2/+20
|
* Only listen for mouse events from master devicesRobert Knight2015-07-221-1/+1
| | | | | | | | | | | | | | 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
* Report focus in/out events under X11Robert Knight2015-06-281-2/+6
| | | | Fixes #377
* X11 - Ignore scroll events that happen outside of Glutin windowsRobert Knight2015-06-281-2/+14
| | | | | | | | | | | Scroll deltas are calculated in X11 by comparing the current and previous absolute values for the scroll axis when a scroll motion event is received. If the user scrolls whilst the cursor is outside of the window then an incorrect delta is reported when the cursor re-enters the window. Fix this by resetting the last-seen axis values whenever the cursor re-enters the window.
* Remove XInput2 code for handling keyboard eventsRobert Knight2015-06-281-54/+29
| | | | | | | * For the moment we're still using plain core X11 events for handling keyboard activity, so remove the XInput2 code for that * Small refactoring of X11 input handling and documentation fixes
* Use XInput2 for event handlingRobert Knight2015-06-281-0/+337
This provides smooth scrolling for touchpad devices and will enable support for touch events etc. in future.