Commit Graph

100 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
cfac96b809 drop compat with Xserver < 21.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:09:52 +01:00
Enrico Weigelt, metux IT consult
5c74de60b3 drop compat with ancient xservers
Relying on xserver >= 1.18, which has XINPUT 22.1

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 15:08:12 +01:00
Enrico Weigelt, metux IT consult
e8a08514f6 drop obsolete #ifdef HAVE_CONFIG_H
config.h is always present

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 18:55:18 +01:00
Enrico Weigelt, metux IT consult
fbfb16edfe tolerate including linux/input.h
On some platforms (eg. FreeBSD) we're running into a name clash between
xf86str.h and linux/input.h. Since we don't actually need those symbols
here, an easy workaround is #undef'ing them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/6>
2024-06-10 18:42:22 +02:00
Enrico Weigelt, metux IT consult
409e8205e8 fix unportable linux-only include
including <linux/types.h> obviously isn't portable - instead using
<sys/types.h> is the right choice for us.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/6>
2024-06-10 18:38:12 +02:00
David Strobach
425ed6017a Middle emulation - make the emulated button number configurable
Sometimes it may be desirable to remap physical middle button
to something else and use emulation instead. The emulation is
however hardcoded to emulate physical button 2, so the emulated
button gets remapped together with the physical one. This patch
adds the Emulate3Button configuration option to allow for user
selection of the emulated button number and a configuration
like this:

Section "InputClass"
    Identifier "Middle button emulation config"
    MatchProduct ".... some device ..."
    MatchDriver "evdev"
    Option "Emulate3Buttons" "on"
    Option "Emulate3Button" "9"
EndSection

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-11-21 15:26:58 +10:00
Keith Packard
bb8bde7456 Support XINPUT ABI 24 (remove select mask from block/wakeup handlers)
The evdev driver wasn't using the select mask arguments, so this
change just involves adjusting the argument lists.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-06 13:51:21 +10:00
Keith Packard
7b1267f7f1 Support XINPUT ABI version 23 (threaded input)
Use input_lock/input_unlock calls instead of SIGIO functions

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-02 09:42:05 +10:00
Thomas Hindoe Paaboel Andersen
034be31159 Add "Resolution" option for mice to the evdev driver
It can be used to scale the resolution of a mouse to that of a 1000 DPI
mouse. This can be useful to make high resolution mice less sensitive
without turning off acceleration. The target of 1000 DPI is used as the
same default is used in libinput. If the option is not set no scaling
will be done.

https://bugs.freedesktop.org/show_bug.cgi?id=88134
Signed-off-by: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-27 14:59:27 +10:00
Peter Hutterer
38e107a39f Disable axis faking and MT event processing on fake MT devices
This effectively disables all axes >= ABS_MT_SLOT on those devices. But at
least the device comes up without an error and it didn't work correctly
beforehand anyway.

https://bugs.freedesktop.org/show_bug.cgi?id=89473

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-03-11 15:21:09 +10:00
Peter Hutterer
2c9f4f0380 Require multitouch/smooth scrolling dependencies
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-03-11 15:02:11 +10:00
Éric Brunet
593bbc6390 drop the pEvdev->delta array
Now that relative events have their own valuator mask, use it instead of
delta

Signed-off-by: Éric Brunet <Eric.Brunet@lps.ens.fr>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-17 14:32:41 +10:00
Éric Brunet
e0e2587a95 Split pEvdev->vals into pEvdev->abs_vals and pEvdev->rel_vals
This should hopefully fix bug 84445.

Signed-off-by: Éric Brunet <Eric.Brunet@lps.ens.fr>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-17 14:26:25 +10:00
Éric Brunet
605047613c Don't pass superfluous arguments to EvdevPost*Events
The functions EvdevPostProximityEvents, EvdevPostRelativeMotionEvents,
EvdevPostAbsoluteMotionEvents and EvdevPostQueuedEvents are only called
by EvdevProcessSyncEvent. These functions take as arguments an array of
valuators which is set by EvdevProcessSyncEvent to contain ... nothing.
This patch changes the prototype of the four functions, their definitions
and the way they are called  to remove the useless array of valuators.

Signed-off-by: Éric Brunet <Eric.Brunet@lps.ens.fr>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-09-29 11:18:16 +10:00
Peter Hutterer
8ce06c96e4 Make the slot-state per slot
The previous approach only had the slot state for the current slot. If we
changed slots, that means we lost the information if the slot was ever
initialized. If the ABS_MT_TRACKING_ID was never received, the slot would
still update and try to send events (which the server refused with a warning).

Avoid this by having a per-slot state and a dirty bit that tells us if the
current slot updated at all. If we don't get the tracking ID, leave the slot
empty and refuse any further events from that touch.

This quashes the various "unable to find touch point 0" warnings caused if a
touchpoint starts before the device is enabled.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Walter Harms <wharms@bfs.de>
2014-08-18 10:01:47 +10:00
Peter De Wachter
c3251deb4b Add configuration options for smooth scrolling.
This patch creates three new xorg.conf options, VertScrollDelta,
HorizScrollDelta and DialDelta, which adjust the sensitivity of
smooth scrolling. These options take a positive integer, default
value is 1.

Signed-off-by: Peter De Wachter <pdewacht@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-21 15:47:54 +10:00
Peter Hutterer
164c62a975 Use libevdev as backend
Removes the need to ioctl manually and check bits, with all the dangers that
come with that. libevdev is much better prepared for invalid values, OOB
checks, etc.

Plus, we get almost free SYN_DROPPED handling as well which we didn't have
before.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-04 16:19:19 +10:00
Peter Hutterer
8f209ac60d Drop cached name and led_bitmask - nothing reads this
Both fields are write-only as of xf86-input-evdev-2.5.99.902-1-g1ced7ec

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-05-31 06:57:22 +10:00
Peter Hutterer
b59a1a25da Add option TypeName (#62831)
evdev tries to assign the right XI 1.x type-name based on various device
capabilities. In some cases, that fails. e.g. the Mionix Naos 5000 mouse
looks like a keyboard. And we assign a keyboard type in that case since
there are plenty of keyboards that also advertise some axes or others.

Add a new option TypeName to allow for system-wide configuration of such
devices in a quirks file.

This can also be used to address #55867

X.Org Bug 62831 <http://bugs.freedesktop.org/show_bug.cgi?id=62831>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-04-16 10:25:02 +10:00
Peter Hutterer
2f67509b53 Split rel and abs axis mapping into two separate arrays
This will enable a device to have relative scrolling axes in addition to
absolute axes (required by the QEMU tablet).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-23 17:33:10 +10:00
Peter Hutterer
f2d2b65343 Localise XKB initialization
No need to store this in the evdev struct.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-08 15:07:03 +10:00
Peter Hutterer
5af11b6752 Use LogMessageVerbSigSafe if available
Messages logged during the signal handler should use LogMessageVerbSigSafe
as of ABI 18.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2012-08-10 17:38:35 +10:00
Chase Douglas
4145fe1c08 Fix buffer overrun when populating axis label property array
The axis label property array currently only has enough elements for the
non-multitouch axes. This change allocates enough space for all axes,
which prevents an array overrun write. This may manifest as stack
corruption on some platforms.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-06-07 11:31:57 +10:00
Chase Douglas
bc2f01ab83 Copy last valuator values into new touch valuator masks
Evdev is a 100% stateful protocol. The following represents three
touches. Two touches begin and end at the same time at (500, 500) and
(1000, 1000). The third touch begins after the first two end, and is at
(500, 500).

ABS_MT_SLOT		0	/* Set touch slot */
ABS_MT_TRACKING_ID	0	/* New touch with ID 0 in slot 0 */
ABS_MT_POSITION_X	500	/* Initial X position */
ABS_MT_POSITION_Y	500	/* Initial Y position */
ABS_MT_SLOT		1	/* Set touch slot */
ABS_MT_TRACKING_ID	1	/* New touch with ID 1 in slot 1 */
ABS_MT_POSITION_X	1000	/* Initial X position */
ABS_MT_POSITION_Y	1000	/* Initial Y position */
SYNC				/* End of frame */
ABS_MT_SLOT		0	/* Go back to slot 0 */
ABS_MT_TRACKING_ID	-1	/* Touch in slot 0 ended */
ABS_MT_SLOT		1	/* Go to slot 1 */
ABS_MT_TRACKING_ID	-1	/* Touch in slot 1 ended */
SYNC				/* End of frame */
ABS_MT_SLOT		0	/* Go back to slot 0 */
ABS_MT_TRACKING_ID	2	/* New touch in slot 0 with ID 2 */
SYNC				/* End of frame */
ABS_MT_TRACKING_ID	-1	/* Touch in last slot (0) ended */
SYNC				/* End of frame */

Note that touch 2 has the same X and Y position as touch 0. This is
implied because no new value was emitted for slot 0. In fact, Linux will
not emit an event in the same slot with the same event type and code
unless the value has changed. Thus, we can only assume that all the MT
valuators have the same values as they were when they were last sent for
the given slot.

This change adds an array of valuator mask to hold all the last valuator
values that came from evdev for each slot. When a new touch begins, all
the last values are copied into it.

This patch assumes initial axis values of 0 in each slot. Linux and
mtdev do not provide a facility to query the current values of axes in
each slot yet. This may cause spurious incorrect touch valuator values
at the beginning of an X session, but there's nothing we can do about it
right now.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-01-24 12:12:47 +10:00
Jeremy Huddleston
009ac94a8e Remove redundant redeclaration of Evdev3BEmuPreInit
Found-by: Tinderbox
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-12-31 21:28:53 -05:00
Peter Hutterer
6dd6f2d3c6 Require xserver 1.12 RC1
Remove the ABI check hack, just check for the server version directly now
that we have one that definitely has the multitouch APIs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-29 10:37:38 +10:00
Peter Hutterer
ba9377c6d9 Remove need for --enable-multitouch
If we spot inputproto 2.1.99.3, we assume we have a capable X server. This
should really be a server version check, but the server version hasn't been
bumped yet.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-24 12:49:18 +10:00
Peter Hutterer
7f7606fc46 Include config.h from evdev.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-24 12:49:18 +10:00
Peter Hutterer
0ba58f483e Always include mt_mask in the evdev struct
Even if MT support isn't available, include it in the build. The checks in
the code check whether mt_mask is non-NULL but they would all need ifdef
escaping otherwise.

Leave the mtdev part inside the ifdef however, so that we don't need the
mtdev header if we don't build with multitouch.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-24 12:18:16 +10:00
Peter Hutterer
5e9b027807 Replace 0/1 button values with enums
BUTTON_PRESS is much harder to confuse with a button number than a simple 1.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11 15:50:36 +10:00
Peter Hutterer
2ce305129c Skip event posting for empty slots.
ABS_MT_SLOT comes before any other events. The following order of events
is common for protocol B devices (and mtdev):

...
EV_SYN
ABS_MT_SLOT        → posting here means we miss on the position information
ABS_MT_POSITION_X
ABS_MT_POSITION_Y
ABS_MT_SLOT
ABS_MT_POSITION_X
ABS_MT_POSITION_Y
EV_SYN

Store the stot state as SLOT_EMPTY after posting an event (i.e. EV_SYN and
ABS_MT_SLOT) and then don't post until the next slot/syn event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11 15:50:36 +10:00
Peter Hutterer
9411749f76 Replace open_slot/close_slot with a SlotState enum
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11 15:50:36 +10:00
Chase Douglas
c9a2b4e9ce Use MTDev for multitouch devices
MTDev translates all multitouch devices to the slotted evdev protocol.
This provides a clean and uniform interface and reduces message handling
inside the input module and X.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-11 15:50:36 +10:00
Chase Douglas
e18abd0049 Add experimental XI 2.1 multitouch support
This multitouch addition only supports slotted MT evdev protocol
devices. Support must be enabled at configure time using
--enable-multitouch.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>

Amendments: XI_TouchMotion -> XI_TouchUpdate, rename mtMask to mt_mask

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-11-11 15:50:06 +10:00
Peter Hutterer
b450efdf95 Support smooth scrolling on REL_WHEEL, REL_HWHEEL and REL_DIAL
Automatic smooth scrolling setup for these axes, with REL_WHEEL and REL_DIAL
both mapping into vscrolling. REL_WHEEL is the preferred axis.

Mouse wheel emulation is not yet updated for smooth scrolling.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-11-09 15:56:55 +10:00
Peter Hutterer
b79776cf8c Require server 1.10
We require ABI 12.2 in the driver, enforce it through pkg-config.
Technically ABI 12.2 is first available in 1.9.99.902 but 1.10 looks so much
nicer.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-06-15 10:36:36 +10:00
Peter Hutterer
eaf202531f Export device node as property.
There is currently no mapping between XI devices and physical devices other
than what can be extracted by parsing the Xorg logfile. Add new property
"Device Node" to the driver to export the open device file.

Server 1.11 and later standardises on this property name.

The client is responsible for detecting if the device is on the same host
and converting the data into a more useful format (e.g. sysfs path).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-27 15:32:23 +10:00
Peter Hutterer
e9d96e87ac Add a property to toggle function key mode
On some keyboards, the multimedia function keys are overlaid with the F
keys. This property enables clients to switch the primary mode of these F
keys between function keys and multimedia keys.
Some keyboards provide an Fn key to toggle between the modes. This is
hardware-specific and may or may not work on any given keyboard device.

The current imlementation is only hooked up to apple keyboards.
The kernel provides a tweak to enable/disable.

/sys/module/hid_apple/parameters/fnmode
    0 .. keyboard sends Fx keys, Fn disabled
    1 .. keyboard sends multimedia keys, Fn toggles to function keys
    2 .. keyboard sends function keys, Fn toggles to multimedia keys

If fnmode is on 0, we force it to 2.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
2011-05-27 15:26:57 +10:00
Peter Hutterer
bb15bac149 Export product/vendor ID through a property.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-05-27 15:26:53 +10:00
Rami Ylimäki
41111ce1ef Remove constness of device filename to avoid warning when freed.
A warning from free() can be avoided by casting the constness away
from its argument pointer or by not declaring the pointer as const in
the first place.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-09 15:28:10 +10:00
Peter Hutterer
d9001a6be9 Add third button emulation.
New properties:
"Evdev Third Button Emulation" → switch on/off
"Evdev Third Button Emulation Timeout" → timeout until event is delivered
"Evdev Third Button Emulation Button" → phys button to be emulated
"Evdev Third Button Emulation Threshold" → move threshold before emulation
is cancelled

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <tissoire@cena.fr>
2011-02-08 11:34:51 +10:00
Chase Douglas
768c25a99b Add support for masked valuators
With the X server now supporting masked valuators for XI2, enable
support in X evdev.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-25 11:34:24 +10:00
Chase Douglas
8bc4be3048 Remove support for X input ABI < 12.2
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-24 14:12:39 +10:00
Peter Hutterer
9aea1c5fa0 Add use_proximity bit for BTN_TOOL handling.
Touchpads send garbage data between BTN_TOOL_FINGER and BTN_TOUCH. This
leads to cursor movement towards invalid positions (bottom left corner,
usually).

Add a new flag "use_proximity" as a delimiter for BTN_TOUCH handling. If
unset, the actual proximity bits are ignored, no proximity events are sent
and BTN_TOUCH is used for the tool handling.

Example event stream for synaptics:

Event: time 1292893041.002731, -------------- Report Sync ------------
Event: time 1292893041.015807, type 1 (Key), code 330 (Touch), value 0
Event: time 1292893041.015812, type 3 (Absolute), code 0 (X), value 4283
Event: time 1292893041.015813, type 3 (Absolute), code 1 (Y), value 4860
Event: time 1292893041.015815, type 3 (Absolute), code 24 (Pressure), value 23
Event: time 1292893041.015817, type 3 (Absolute), code 28 (Tool Width), value 5
Event: time 1292893041.027537, -------------- Report Sync ------------
Event: time 1292893041.038854, type 3 (Absolute), code 0 (X), value 1
Event: time 1292893041.038857, type 3 (Absolute), code 1 (Y), value 5855
Event: time 1292893041.038859, type 3 (Absolute), code 24 (Pressure), value 1
Event: time 1292893041.038861, type 3 (Absolute), code 28 (Tool Width), value 5
Event: time 1292893041.038864, -------------- Report Sync ------------
Event: time 1292893041.062432, type 3 (Absolute), code 24 (Pressure), value 0
Event: time 1292893041.062435, type 3 (Absolute), code 28 (Tool Width), value 0
Event: time 1292893041.062437, type 1 (Key), code 325 (ToolFinger), value 0
Event: time 1292893041.062438, -------------- Report Sync ------------

Reported-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
2010-12-22 09:18:52 +10:00
Peter Hutterer
242a01eb0f Rename proximity to in_proximity.
No functional change, just making it a bit more obvious to read.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
2010-12-22 09:07:28 +10:00
Peter Hutterer
b06d3ffdcd Rename abs/rel/prox to abs_queued/rel_queued/prox_queued.
Mainly to avoid confusing between pEvdev->prox and pEvdev->proximity and to
better express what these fields are actually holding.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-10-21 08:12:38 +10:00
Peter Hutterer
b48f4c41c0 Add proximity support.
When one of the tools comes into proximity, queue up a proximity event and
send it accordingly.

Includes special handling for tablets that do not send axes with tools
(#29645)

Some tablets send axis values, then EV_SYN, and in the next event the
BTN_TOOL_PEN/BTN_TOUCH, etc. For these tablets, the cursor doesn't move as
coordinates while not in proximity are ignored.

Buffer coordinates received while out-of-proximity and if we get a proximity
event without other coordinates, re-use the last ones received.

X.Org Bug 29645 <http://bugs.freedesktop.org/show_bug.cgi?id=29645>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2010-10-18 09:54:42 +10:00
Peter Hutterer
185ad42078 Rename evdev->tool to evdev->proximity.
evdev doesn't care about the actual tool used, only that it is used as an
indicator for proximity. Rename the field accordingly to make the code more
obvious to read.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
2010-10-13 11:01:12 +10:00
Peter Hutterer
4bbf9c9125 Don't pass pointers around to first_v and num_v.
We only use them as values, no need for the addresses.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
2010-10-11 08:46:09 +10:00
Peter Hutterer
21a2ac818e Disable middle mouse button emulation by default.
The AUTO feature was the default, MB emulation was on until a middle mouse
button was pressed. MB emulation however results in a delay of the first
press, causing minor annoyances to the users and being generally confusing
when the behaviour before a button press is different to after a button
pres.

Disable the feature by default instead. There's not a lot of two-button mice
around anymore though and the inability to detect two-button mice makes for
non-deterministic detection of when the emulation should be on.

Middle button emulation can be enabled with a configuration snippet:

Section "InputClass"
        Identifier "middle button emulation"
        MatchIsPointer "on"
        Option "Emulate3Buttons" "on"
EndSection

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniel@fooishbar.org>
2010-05-31 11:01:26 +10:00