Commit Graph

40 Commits

Author SHA1 Message Date
Peter Hutterer
e8887435ac Enable middle-mouse button emulation.
Ported from xf86-input-mouse, with a few cleanups.
2008-06-10 22:46:20 +09:30
Peter Hutterer
b0f6987ee6 Plug a memory leak, we allocated pEvdev twice, dropping the first memory area. 2008-06-10 22:43:37 +09:30
Sven Wegener
fec73e1418 evdev: Port b4a5a204 "Fix pointer crossing screen bug." to current master branch
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>
2008-06-08 21:44:57 +09:30
Peter Hutterer
da112737eb Check for XINPUT ABI < 3 (corrected version)
Thanks to Sven Wegener for pointing out the incorrect previous version.
2008-06-08 00:15:26 +09:30
Peter Hutterer
d40125ea8c Revert "Check for XINPUT ABI, parameters of InitValuatorClassRec have changed."
GetMotionEvents() doesn't exist, led to compile errors with servers pre-MPX
merge. Thanks to Sven Wegener for pointing this out.

This reverts commit 42422d8f69.
2008-06-08 00:13:35 +09:30
Peter Hutterer
42422d8f69 Check for XINPUT ABI, parameters of InitValuatorClassRec have changed. 2008-05-26 19:29:32 +09:30
Peter Hutterer
15e0091f0b Fail if the device cannot be grabbed during the probe.
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.
2008-05-23 09:52:46 +09:30
Dan A. Dickey
a4a7003f7c Fix a trivial bug in testing for absolute axes.
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-20 10:57:06 +09:30
Peter Hutterer
3e0dc9945d Shut up two compiler warnings. 2008-05-19 08:36:20 +09:30
Peter Hutterer
ff6251a2bd Remove unused EvdevOpts and EvdevOptions.
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.
2008-05-19 08:24:55 +09:30
Peter Hutterer
8b7738457f Don't allow relative and absolute axes on the same device.
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).
2008-05-02 11:17:57 +09:30
Sascha Hlusiak
1b9deb8e7e Add XK_Meta_L and XK_Meta_R to list of modifiers
Stopps meta/super key from autorepeating
2008-04-01 17:24:13 +02:00
Daniel Stone
0ec391f51c Keyboard: Don't allow arbitrary keymap settings
Pretty much dead code anyway.
2008-03-28 17:46:38 +02:00
Adam Jackson
f77410e1f9 Map REL_DIAL to REL_HWHEEL.
Some Microsoft mice have this wrong.  And it seems like a sensible thing
to do anyway.
2008-03-14 11:15:01 -04:00
Adam Jackson
d28c2e1efb Filter out repeat events for mouse buttons.
Not many mice do this, but some do, Apple Mighty Mouse in particular, and
it makes click-and-drag pretty much impossible to use.

Arguably we should filter _all_ repeat events from the kernel and handle
synthesizing them in the server.
2008-03-12 13:54:10 -04:00
Adam Jackson
697e850a63 Fix middle/right button munging.
Don't do this in the button map.  That's writeable by clients, which means
they have the chance to get it wrong.  Just swap right and middle around
in event dispatch before you get to the user's map.
2008-03-11 19:07:58 -04:00
Adam Jackson
87037b9953 Force xkb_model to be "evdev".
Or at least, refuse to recognise the config option.  It's nonsensical to
use a model of something other than evdev, and it'll just break if you try.
2008-03-10 17:16:38 -04:00
Dan Nicholson
71f4eaec77 Fix cut-and-paste errors in xkb alternate spellings code
Fixes 2b334d6b69.
2008-03-09 22:52:13 +01:00
Adam Jackson
7208397612 Fix cut-and-paste error in abs-to-rel translation. 2008-03-09 16:15:14 -04:00
Adam Jackson
c250f84383 Fix the default XKB rules to be "base" instead of "xfree86". 2008-03-09 15:54:27 -04:00
Adam Jackson
2b334d6b69 Handle the alternate spellings of the xkb options. 2008-03-09 15:53:40 -04:00
Adam Jackson
1a0bc8e64a Force maximum keycode to be 255
Even though we don't have keycodes for anything above 127, make sure our
map always covers up to 255.  This ensures that the keycode range never
changes.

Spiritually cherry-picked from a9e87f29cc
and 6db4a9fb84.
2008-03-08 20:06:24 -05:00
Adam Jackson
6271494faa Add absolute coordinate event support.
There are two major classes here, touchscreens and touchpads.  Touchpads
are logically more like relative devices, in that your initial touch
should not warp the cursor.  So attempt to detect touchpads (via the
existence of BTN_TOUCH) and translate absolute events from those devices
to relative motion.
2008-03-08 19:54:44 -05:00
Adam Jackson
f5bfc7ec3c Nuke the keyboard bell code.
It did nothing, and the core won't invoke it anymore anyway.
2008-03-08 16:52:17 -05:00
Adam Jackson
bf0848ec8e Re-add XKB support.
Almost entirely taken from a patch I did ages ago in bug #3912, with
slight cleanups, and with the KcCGST options removed as per evdev 1.x.
2008-03-08 16:50:20 -05:00
Adam Jackson
f1445feac7 Parse Option "Path" as well as Option "Device".
The hotplug core passes Path not Device.  With this change, hotplugging
works.
2008-03-08 16:09:47 -05:00
Adam Jackson
ad5bdcb50f Ignore button events above BTN_TASK for now. 2008-03-07 20:29:58 -05:00
Adam Jackson
bb36ca65c6 Support the new DIX motion history API
Spiritually cherry-picked from 036b457c1b
2008-03-07 19:43:07 -05:00
Daniel Stone
40a1e1439c remove XFree86LOADER usage
Build evdevModuleData, et al, unconditionally.
2008-03-07 19:38:33 -05:00
Adam Jackson
946beb16f8 Unlibcwrap. 2008-03-07 19:09:35 -05:00
Adam Jackson
ce0cafa115 Bug #3913: Suppress kernel-generated repeat events for chording keys. 2005-09-23 22:32:23 +00:00
Adam Jackson
b446f59cc5 Yet more 2.4 build fixes, this time for BTN_TASK. 2005-07-28 01:48:14 +00:00
Kristian Høgsberg
f745d59b6c Handle BTN_TASK too (#3859). 2005-07-25 16:07:34 +00:00
Adam Jackson
74021126a6 Prep input drivers for modularizing by adding guarded #include "config.h" 2005-07-11 02:37:59 +00:00
Adam Jackson
672f8cd661 Add some build compatibility for 2.6 linux systems with 2.4 kernel headers
installed. Allow the use of evdev for mice on 2.4 kernels.
2005-07-03 00:06:01 +00:00
Adam Jackson
0145e216a7 Bug #3626: _X_EXPORT tags for video and input drivers. 2005-06-25 21:17:01 +00:00
Adam Jackson
df1b2f476d Bug #968: Grab the event device used by the evdev driver to avoid weird
issues when input goes to multiple places. Restrict building the evdev
    driver to 2.6 kernels since EVIOCGRAB didn't exist in 2.4.
2005-05-11 00:13:15 +00:00
Kristian Høgsberg
319e1b28a3 Handle horizontal wheel events and move mapping of extra buttons up so they
don't overlap the wheel buttons. Patch from Alan Swanson (#968).
2005-01-18 20:18:09 +00:00
Adam Jackson
4ada85ef11 Build fixes for static server. 2005-01-14 17:14:07 +00:00
Kristian Høgsberg
bdd94f37b3 Add new evdev input driver. This driver uses the linux input layer directly
and can handle both mice and keyboards.
Convert this to UTF-8 again. The ChangeLog should be kept in UTF-8.
2005-01-12 20:15:52 +00:00