aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
Commit message (Collapse)AuthorAge
* Fix FOO_MAX off-by-oneMatt Helsley2009-01-13
| | | | | | | | | | | | | | | | | | | | | | In linux/input.h each section's (e.g. ABS) FOO_MAX is the maximum FOO value. Recent kernels define FOO_CNT as the maximum number of FOO there will ever be. Hence using FOO_MAX to size the bit vectors representing the capabilities of an evdev device is off by one. Define FOO_CNT values for use with Linux kernels which lack them. Use FOO_CNT whenever we need to know the number of bits needed -- usually to calculate the number of longs needed. When iterating over the values FOO_MAX still seems appropriate however the loop test should include FOO_MAX rather than skip it. Signed-off-by: Matt Helsley <matt.helsley@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 4dfd86b2201b2b19761a1abb3c580cecf0060224) Conflicts: src/evdev.c
* rename NBITS to NLONGS to reflect its actual meaningMatt Helsley2009-01-13
| | | | | | | | | | | | | NBITS really convers the number of bits passed as its argument into a number of longs. This is somewhat atypical of many function-like-macro names. Rename it to NLONGS. Signed-off-by: Matt Helsley <matt.helsley@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry-picked from commit d3fd42d8644310abcae23bbf534f8c445296bcb7) Not really required, but it makes cherry-picking 4dfd86b2201b2b19761a1abb3c580cecf0060224 easier.
* Store device file's minor/major to avoid duplicate devices.Peter Hutterer2008-11-18
| | | | | | | | | Devices added that use the same min/maj as an already added device are ignored by the driver. This way users can have an xorg.conf entry on /dev/input/by-id/blahblah and not get the same device added by HAL. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> (cherry picked from commit 63af314368cec47b6b8266db331f2c820e7a071f)
* Add support for axes swapping.Peter Hutterer2008-11-03
| | | | | | | | | | New option: SwapAxes (boolean) New property: EVDEV_PROP_SWAP_AXES. Actual swapping code written by Donnie Berkholz. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> (cherry picked from commit 4826969f23a0b298da2750c2e23a92b9d91819dd)
* Add support for run-time calibration.Peter Hutterer2008-11-03
| | | | | | | | | | | Some devices require run-time axis calibration. We can't change the min/max ranges once we've initialised the valuator structs though, so in-driver run-time calibration is required. If the property is set, the driver scales from the calibrated range to the values reported to the X server (which then may scale to screen coordinates). If the property is not set (i.e. zero items) no scaling is performed. (cherry picked from commit 33eb36f26663c09c873acede1b35e91ef4c64479)
* Treat BTN_[0-2] as LMR buttons if necessary.Peter Hutterer2008-11-03
| | | | | | | | | | | | | | Treat BTN_[0-2] as LMR buttons on devices that do not advertise BTN_LEFT, BTN_MIDDLE, BTN_RIGHT (e.g. 3Dconnexion SpaceNavigator). Otherwise, treat BTN_[0+n] as button 5+n. Note: This causes duplicate mappings for BTN_0 + n and BTN_SIDE + n. This also fixes a bug where we could end up with negative button numbers after trying to map BTN_0. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> (cherry picked from commit 64554e4799a697d37dfd8be480f8eee636b9bea1)
* emuMB: add EvdevMBEmuOn and call from EvdevOn to register wakeup handlers.Peter Hutterer2008-11-03
| | | | | | | | This got broken in b0737bdbd1f6e601eb4984b6f4cb49279190984c, when the EmuMBPreInit call was removed from EvdevOn. As a result, VT switching away and back wouldn't restore the wakeup handlers and mouse button presses disappeared. (cherry picked from commit af096e8c5d8b425f725a37bf4a98e205e70716e9)
* Add option "GrabDevice", don't grab the device by default.Peter Hutterer2008-10-23
| | | | | | | | | We now have the matching code in the server to set the console to RAW mode and don't need to grab the devices anymore. This is an updated version of e8534d47c8524ac081c2e3e6ebaabe4c6b274a18, which was reverted in 6dc41991557fa55a9e2f5aaf0fe40c70a08d41fd. (cherry picked from commit 4912e2aa7f867a86d383010023b8426c881fb3b0)
* Don't include the client-side header anymore. xkbstr.h is server SDK.Peter Hutterer2008-10-14
| | | | (cherry picked from commit bb1f42168761b928478a9cb066457b525c41ddd9)
* Tidy up evdev.hPeter Hutterer2008-10-14
| | | | | | This includes shuffling some functions around so we don't need the prototypes in evdev.h. (cherry picked from commit 0405f7b17fb0ce5cadcc6c5aa6eeb61bdacdf9cd)
* Rename DragLockInit to DragLockPreInit, remove superfluous "return".Peter Hutterer2008-10-14
| | | | (cherry picked from commit 088e0a175a4913bf827c1f7e19de09fdf987d347)
* Add checkonly handling to property handlers.Peter Hutterer2008-10-11
| | | | | If checkonly is TRUE, we can only check if applying the value would succeed. The value is actually applied if checkonly is FALSE.
* Add support for axis inversion.Søren Hauberg2008-10-03
|
* Use new property API (no ConfigureDP, less args to ChangeDP)Peter Hutterer2008-09-26
| | | | | Return appropriate status codes from property handlers. Make properties non-deletable.
* Attempt to re-open devices on read errors.Peter Hutterer2008-09-04
| | | | | | | | | | | | Coming back from resume may leave us with a file descriptor that can be opened but fails on the first read (ENODEV). In this case, try to open the device until it becomes available or until the predefined count expires. To be safe, we cache the information from the device and compare against it when we re-open. This way we ensure that if the topology changes under us, we don't open a completely different device. If a device has changed, we disable it. Adds option "ReopenAttempts" <int>
* Use HAVE_PROPERTIES define instead of GET_ABI_MAJOR for property compilation.Peter Hutterer2008-09-04
|
* Add timeout support for mouse wheel emulationDan Nicholson2008-08-22
| | | | | | | Support the EmulateWheelTimeout option as the mouse driver does. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
* Add property support for drag lock.Peter Hutterer2008-08-18
|
* Adding in DragLockButtons functionality.Chris Salch2008-08-18
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
* Revert "Don't grab devices unless specified through the config options."Peter Hutterer2008-08-15
| | | | | | | | | | Not such a good idea, CTRL+C terminates the server and other issues. Reverting for now until a better solution is found, at least this way the driver is usable. See also: http://lists.freedesktop.org/archives/xorg/2008-August/038032.html This reverts commit e8534d47c8524ac081c2e3e6ebaabe4c6b274a18.
* Don't grab devices unless specified through the config options.Peter Hutterer2008-08-14
| | | | | | | Grabbing event devices stops in-kernel event forwarding, most notably rfkill and the "Macintosh mouse button emulation" device. Let's not do that. Option "GrabDevice" forces grabbing the device.
* Simplify the property handler registration.Peter Hutterer2008-08-08
| | | | | Instead of having separate handlers for each property, just handle all of them in one handler for emuMB, and one handler for emuWheel.
* Add EVDEV_MAXBUTTONS instead of checking against 32.Peter Hutterer2008-08-08
| | | | Numbers are so lame, defines are all the rage now I've heard.
* Expose wheel emulation through device properties.Peter Hutterer2008-08-08
| | | | Don't enable wheel emulation with 0 inertia - bad things happen.
* Adding mouse wheel emulation code.Chris Salch2008-08-07
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Adding a function to map button events to button numbers.Chris Salch2008-08-06
| | | | | | | Remove code duplication, let the mapping function hand us the actual button event to be passed up to the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add support for ButtonMapping option.Peter Hutterer2008-07-22
|
* Add support for device properties, currently MB emulation and timeout.Peter Hutterer2008-07-10
|
* Count buttons at probe and print to log.Peter Hutterer2008-06-28
| | | | | | We don't really do anything with the number other than print it since I'm sure that half the mice don't report the correct number anyway (especially with the wheel button mapping). But having a bit more debug info is good.
* Remove wakeup handlers when device is closed.Peter Hutterer2008-06-11
| | | | Less SIGABRTs are less exciting, but sometimes boredom is what we want.
* Enable middle-mouse button emulation.Peter Hutterer2008-06-10
Ported from xf86-input-mouse, with a few cleanups.