aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.c
Commit message (Collapse)AuthorAge
...
* Set pInfo->fd to -1 on DEVICE_CLOSEJulien Cristau2008-10-11
| | | | | | | | This allows the reopen logic to kick in later. DEVICE_CLOSE gets called on regen, so without this we'd keep a stale file descriptor in pInfo->fd in subsequent sessions. Debian bug#496101 (http://bugs.debian.org/496101)
* Add property support for axis inversion.Peter Hutterer2008-10-03
|
* Add support for axis inversion.Søren Hauberg2008-10-03
|
* Close fd on DEVICE_OFF. (LP #276887)Peter Hutterer2008-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | Leaving the fd open means we still get keyboard events after VT switching away. Coming back, some of these events are replayed on the application that has the current focus. Reproduceable: 1. open terminal, focus. 2. VT switch away 3. type something, preferably a password 4. VT switch back, trigger a mouse event 5. Observe the X server guessing your password. Closing the fd on DEVICE_OFF fixes this. Reopen is handled by the reopen code introduced with commit 9930477cbeb4acfd070ae70894d13ffabfc347b8 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Aug 26 14:33:40 2008 +0930 Attempt to re-open devices on read errors. Launchpad Bug 276887 <https://bugs.edge.launchpad.net/ubuntu/+source/xorg-server/+bug/276887>
* Register property handlers directly, instead of abstracting them.Peter Hutterer2008-09-30
| | | | | | This removes a left-over from the early device property code where we could only have a single handler. Now it's easier to just register the handlers for each subsystem (emulate wheel, draglock and MB emulation).
* 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 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>
* Force rules, not model, to be evdevDaniel Stone2008-08-16
| | | | | | xkeyboard-config recently changed to a separate ruleset for the evdev driver, so match that by only forcing the ruleset, not the model, to be evdev.
* 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.
* Filter wheel events before middle mouse button emulation.Chris Salch2008-08-08
| | | | | | | The Emulate3Button needs to be the last filter function, otherwise the timeout code causes it to hijack button presses for the first 3 buttons. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
* 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>
* Print a warning if a keycode exceeds the range accepted by the server.Adam Jackson2008-08-07
| | | | | | | Keycodes over 255 are silently ignored in the server. The least we can do is put a warning in the logs. 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>
* Actually close the fd on DEVICE_CLOSE (bug#16948)Julien Cristau2008-08-04
| | | | | | Fixes file descriptor leak. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Print the device name when we get a read errorJulien Cristau2008-07-30
|
* xf86-input-evdev: Fix EVIOCGBIT ioctl usage on big endian platforms.Michel Dänzer2008-07-30
| | | | | | | | | | With this fix, on my PowerBook HAL hotplugging correctly detects my USB mouse, and no longer thinks keyboards have random numbers of mouse buttons. :) The LONG_BITS and NBITS macro definitions are stolen from xf86-input-synaptics. Signed-off-by: Michel Dänzer <michel@tungstengraphics.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add support for ButtonMapping option.Peter Hutterer2008-07-22
|
* Fill up the version infoJulien Cristau2008-07-20
| | | | | Report correct versions instead of "compiled for 0.0.0, module version = 1.0.0"
* Don't enable the device if the grab failed with ENODEV.Peter Hutterer2008-07-14
| | | | | | | After suspend/resume, sometimes the device doesn't come back up on the same node. Since we do not call PreInit for the device (which would detect this situation), we continue to try to read a nonexisting file, spamming the log file with "Read Error".
* Add support for device properties, currently MB emulation and timeout.Peter Hutterer2008-07-10
|
* Remove stale comments.Peter Hutterer2008-07-03
| | | | | Ctrl+Alt+Backspace works, I'm using it daily. CapsLock doesn't repeat, otherwise we wouldn't have Bug 16318.
* Remove EvdevConvert, nobody calls it now anyway.Peter Hutterer2008-07-03
| | | | Conversion is now done in the DIX.
* Mice with a lot of buttons (e.g. Logitech MX1000) generate button events ↵Ander Conselvan de Oliveira2008-06-28
| | | | | | greater than BTN_TASK. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
* 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.
* No need to finalize MB emulation after EvdevProbe anymore.Peter Hutterer2008-06-22
| | | | Follow-up to 76800bfa75807e49398380b902f6c0f547cd4c0e.
* Close file descriptor if EvdevProbe fails.Simon Munton2008-06-22
| | | | Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
* Enable middle button emulation at DEVICE_ON instead of DEVICE_INIT.Keith Packard2008-06-21
| | | | | | | | This ensures that the middle button emulation is re-enabled after VT switch, otherwise the block handler that deals with the timeouts would not get re-registered. Signed-off-by: Keith Packard <keithp@keithp.com>
* Finalize MB emulation if EvdevProbe fails.Peter Hutterer2008-06-12
| | | | | This avoids segfaults when HAL is restarted behind our backs. Also, only init MB emulation when the device actually has a button.
* Remove wakeup handlers when device is closed.Peter Hutterer2008-06-11
| | | | Less SIGABRTs are less exciting, but sometimes boredom is what we want.
* Disable middle mouse button emulation when a real middle MB event is detected.Peter Hutterer2008-06-10
| | | | | | Devices may report middle mouse buttons even if they don't have one (PS/2 devices just don't know any better), so we can't be sure until we see the event.
* Enable middle-mouse button emulation.Peter Hutterer2008-06-10
| | | | Ported from xf86-input-mouse, with a few cleanups.
* Plug a memory leak, we allocated pEvdev twice, dropping the first memory area.Peter Hutterer2008-06-10
|
* evdev: Port b4a5a204 "Fix pointer crossing screen bug." to current master branchSven Wegener2008-06-08
| | | | | | | | | The commit b4a5a204 fixed an issue, where we can't move the pointer to other screens and this happens in current master branch again. This commit ports the old commit to the current master branch. Signed-off-by: Sven Wegener <swegener@gentoo.org> Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
* Check for XINPUT ABI < 3 (corrected version)Peter Hutterer2008-06-08
| | | | Thanks to Sven Wegener for pointing out the incorrect previous version.
* Revert "Check for XINPUT ABI, parameters of InitValuatorClassRec have changed."Peter Hutterer2008-06-08
| | | | | | | GetMotionEvents() doesn't exist, led to compile errors with servers pre-MPX merge. Thanks to Sven Wegener for pointing this out. This reverts commit 42422d8f69e6806e1adfd93017cac064a75041c7.
* Check for XINPUT ABI, parameters of InitValuatorClassRec have changed.Peter Hutterer2008-05-26
|
* Fail if the device cannot be grabbed during the probe.Peter Hutterer2008-05-23
| | | | | | | | | If the grab fails, this is most likely a sign that the device has been grabbed already (probably by a device specified in xorg.conf). So let's not add the device to the server's input device list, since it won't generate events anyway. Exception: keyboards and kernel 2.4 are not affected.
* Fix a trivial bug in testing for absolute axes.Dan A. Dickey2008-05-20
| | | | Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
* Shut up two compiler warnings.Peter Hutterer2008-05-19
|
* Remove unused EvdevOpts and EvdevOptions.Peter Hutterer2008-05-19
| | | | | | | In the mouse driver, these options are only used if XFree86LOADER is undefined. configure.ac in the xserver forces said define to 1 if we're building the xfree86 DDX, so I don't see the point of having them around. Especially since they weren't used in evdev anyway.
* Don't allow relative and absolute axes on the same device.Peter Hutterer2008-05-02
| | | | | | | | | | | | | This is a bit of a mess. The MS Optical Desktop 2000 registers both relative and absolute axes on the same device (the mouse). The absolute axes have a valid min/max range for x/y and thus overwrite the x/y relative axes in the server (no, this is not a server bug). And I wouldn't be surprised if other devices have similar issues. Since the device only sends relative events after that, the mouse is essentially restricted to the min..max range of 0..255. The server simply doesn't do unrestricted relative axis and restricted absolute axis on the same device (not for the same axis numbers anyway).
* Add XK_Meta_L and XK_Meta_R to list of modifiersSascha Hlusiak2008-04-01
| | | | Stopps meta/super key from autorepeating
* Keyboard: Don't allow arbitrary keymap settingsDaniel Stone2008-03-28
| | | | Pretty much dead code anyway.