Commit Graph

453 Commits

Author SHA1 Message Date
Peter Hutterer
990540fa19 evdev 2.5.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.5.0
2010-08-23 10:34:36 +10:00
Peter Hutterer
b8945e61eb man: don't reference README.mouse
No real reason to refer to the mouse driver's readme.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-23 10:27:45 +10:00
Peter Hutterer
97dc45b769 evdev 2.4.99.901
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.4.99.901
2010-08-19 12:50:25 +10:00
Bartosz Brachaczek
ec6cb31cc4 evdev: Initialize valuators array. (#24737)
The array needs to be filled with zeros, otherwise we may end up sending
it with random values if non-zero values aren't in one row (which is the
case for A4Tech X-750F which sends REL_MISC events without a reason).

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

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
Tested-by: Bartek Iwaniec <hash87@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-16 10:45:26 +10:00
Bartosz Brachaczek
ed47c7f33e evdev: Revert "Set all valuators for relative motion events (#24737)"
It isn't necessary to post zero-deltas to X Server. In order not to post
uninitialized "v" array we should rather simply initialize it.

This reverts commit c1f16a4f59.

Signed-off-by: Bartosz Brachaczek <b.brachaczek@gmail.com>
Tested-by: Bartek Iwaniec <hash87@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-16 10:45:07 +10:00
Peter Hutterer
899218e181 Don't count BTN_TOUCH as tool. (#29428)
Devices that don't have a tool but BTN_TOUCH simply have the tool always on.
Devices that have a tool other than BTN_TOUCH set this tool before BTN_TOUCH
is emitted anyway.

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-08-16 10:04:08 +10:00
Alex Warg
421585fda6 Fix out-of-bounds access if more than MAX_VALUATORS are present. (#28809)
The functions EvdevAddRelClass and EvdevAddAbsClass do out of bounds
accesses to vals and old_vals arrays in the EvdevRec structure if there are
more than MAX_VALUATORS axes reported by the kernel.

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

Signed-off-by: Alex Warg <alexander.warg@os.inf.tu-dresden.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-07-01 08:16:07 +10:00
Peter Hutterer
8697811f56 man: some minor fixes to man page.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-28 10:49:56 +10:00
Peter Hutterer
b06bffdc97 Add myself to Authors in man page.
git blames me for about half the driver now, I guess that's enough
justification ;)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-28 10:49:56 +10:00
Gaetan Nadon
9410e452d2 config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS
It depends on util-macros 1.8
The existing statement can now be removed from the configuration file.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-06-16 15:19:39 -04:00
Gaetan Nadon
516e538da4 config: upgrade to util-macros 1.8 for additional man page support
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
The value of MAN_SUBST is the same for all X.Org packages.

Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
The existing statement can now be removed from the configuration file.

Use Automake $() for variables in Makefile.am

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-06-16 15:19:38 -04:00
Gaetan Nadon
1f38e1bc11 COPYING: update and refactor the Copyright notices
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-06-16 15:17:06 -04:00
Peter Hutterer
456579ba30 Bump to 2.4.99
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-01 10:20:25 +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
Peter Hutterer
4c21624240 Remove libc wrappers for malloc, calloc and free.
Evdev is Linux-only, and we've had the above calls for quite a while now.
Plus, now that the server has removed them they generate _a lot_ of warnings
otherwise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-05-28 09:24:28 +10:00
Peter Hutterer
6e244b1098 Move mode declaration, it's not const either.
What we're getting back from xf86SetStrOption is a strdup'd string, not
const, especially given that we free it a few lines down.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-28 09:24:28 +10:00
Peter Hutterer
e7c301563a Move opening the device into a separate function.
Re-use from EvdevOn and PreInit.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-28 09:24:28 +10:00
Peter Hutterer
ffc2c9961f Move checks for calibration, inversion and axis swap to EvdevProbe.
Keyboard devices don't need these checks.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-28 09:24:28 +10:00
Peter Hutterer
7c01cff1fa Move EVIOCGRAB into a static func.
This is in preparation of some major rework, there are no functional
changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-28 09:24:28 +10:00
Peter Hutterer
e6e20c1b3e Move error handling in PreInit down to the end.
Just have one exit path instead of different ones. Guards are in place to
avoid freeing/deleting something that shouldn't be.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-05-28 09:24:28 +10:00
Peter Hutterer
b27d03b248 Comment odd EVIOCGRAB behaviour and reshuffle conditions a bit.
The reason for this rather weird approach is to ungrab immediately after
getting a successful grab. Evdev shouldn't be hogging the device if nothing
is done with it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-05-28 09:24:28 +10:00
Peter Hutterer
ba78428ed5 Remove support for kernel 2.4.
It's been 6 years since 2.6, I doubt evdev would even work on 2.4 right now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-05-28 09:24:28 +10:00
Gaetan Nadon
041a1f246a config: AC_PROG_SED is required explicitly.
It sets the SED env variable with an appropriate sed program path
It still works on some platform when not explicity called.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-05-10 21:44:43 -04:00
Peter Hutterer
44b80d177f Update a stale comment about the use of pEvdev->tool.
Including some typo fixes in the same comment.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-06 11:11:30 +10:00
Peter Hutterer
7bbbce9a83 Read the device resolution from the kernel.
For earlier kernels, use the previous hardcoded resolution in place.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-04-29 22:05:23 +10:00
Peter Hutterer
35b6085bf8 config: remove AH_TOP autoheader statement.
Include it in evdev.h instead.
xorg-server.h is required to define the right datatype sizes on 64 bit,
hence ensure that evdev.h is the first included in each file.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-29 09:07:03 +10:00
Gaetan Nadon
539d67505c Revert "config: remove AH_TOP autoheader statement"
The changed location of xorg-server.h had some side-effects.
See Bug 27768 <https://bugs.freedesktop.org/show_bug.cgi?id=27768>

This reverts commit 9dbace89be.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-22 11:42:49 +10:00
Peter Hutterer
a77dea1caa Merge branch 'master' of git://gitorious.org/omcfadde/xf86-input-evdev 2010-04-20 16:31:09 +10:00
Oliver McFadden
5fb1e841eb evdev: EvdevProbe: check ioctl() return value and warn on failure.
Called function "ioctl" whose return value should be checked (checked 10
out of 11 times)

Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-20 09:12:43 +03:00
Oliver McFadden
a4f2d12cd8 evdev: ioctl() may return a negative value therefor use a signed integer.
Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-20 09:12:38 +03:00
Oliver McFadden
6b5c0401e2 evdev: leaked_storage: free memory allocated from the xf86Option code.
Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-20 09:12:30 +03:00
Gaetan Nadon
993e011b91 man: Use Autoconf provided $(AM_V_GEN)$(SED)
Enables silent rule and use platform appropriate version of sed.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:07 -04:00
Gaetan Nadon
2d5e922a6d include: EXTRA_DIST is not required for header files.
The sdk_HEADERS is sufficient as the "sdk" prefix
matches the "dir" suffix in the "sdkdir" variable.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:07 -04:00
Gaetan Nadon
41a38ec886 config: require macros 1.4, fix warnings, m4 quotings and layout
Fix some m4 quoting
Fix some autoconf warnings
remove AC_PROG_CC as it overrides AC_PROG_C_C99 from XORG_DEFAULT_OPTIONS
Regroup statements per section
Add comments
Upgrade X.Org macros to 1.4 for INSTALL file copying

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:07 -04:00
Gaetan Nadon
b31c00efea config: optional extension check for inputproto not required
The check should be in PKG_CHECK_MODULES permanently.

The XORG_DRIVER_CHECK_EXT will add inputproto to PKG_CHECK_MODULES
only if the extension is available. By definition, this extension
is always available and the evdev driver cannot function without it.

This is evidenced by the absence of XINPUT conditional code.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:07 -04:00
Gaetan Nadon
b48dcfa3f2 config: replace deprecated INCLUDES with AM_CPPFLAGS
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:06 -04:00
Gaetan Nadon
44baa36b99 config: refactor and comment the sdkdir distcheck workaround
Seperate legitimate sdkdir usage from distcheck workaround.
Comment this non obvious workaround.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:06 -04:00
Gaetan Nadon
7fa5982d47 config: remove unrequired AC_HEADER_STDC
Autoconf says:
"This macro is obsolescent, as current systems have conforming
header files. New programs need not use this macro".

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:06 -04:00
Gaetan Nadon
fe8d0fa11a replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
Regroup AC statements at the top.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:06 -04:00
Gaetan Nadon
09b918db86 config: update AC_PREREQ statement to 2.60
Unrelated to the previous patches, the new value simply reflects
the reality that the minimum level for autoconf to configure
all x.org modules is 2.60 dated June 2006.

ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:06 -04:00
Gaetan Nadon
9dbace89be config: remove AH_TOP autoheader statement
The generated config.h does not need to include xorg-server.h
for the content it provides.
Add #include <xorg-server.h> in .[hc] files as needed.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-04-19 08:52:06 -04:00
Paulo Ricardo Zanoni
aaf65e7bfa Don't set pEvdev->rel for mouse wheel events
This way we won't get empty MotionNotify events when the mouse wheel is
used.

Signed-off-by: Paulo Ricardo Zanoni <pzanoni@mandriva.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-17 15:17:27 +10:00
Peter Hutterer
8eede7ea8d Use X_PROBED instead of X_INFO for probed values.
No functional changes, only the log output differs now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
2010-04-09 14:32:18 +10:00
Peter Hutterer
1936632cb0 evdev 2.4.0
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
xf86-input-evdev-2.4.0
2010-04-06 10:31:16 +10:00
Simon Thum
0dc931e1ac move feedback initialization up
This allows the backend to propery initialize the feedback from options,
as it works with most other drivers. This is the hacky equivalent of
fixing the initialization of pointer acceleration, which would require
changes to most drivers however.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-03-24 07:50:55 +10:00
Peter Hutterer
d525b48a2f When labeling a device as touchpad, only check for LMR buttons.
Touchpads that have physical buttons have either LMR or BTN_TOOL_FINGER.
Other buttons in the range evdev recognises shouldn't be taken into account
here - they skew the detection towards touchpads and away from touchscreens.

Fedora Bug 571639

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Simon Thum <simon.thum@gmx.de>
2010-03-18 08:04:01 +10:00
Oliver McFadden
801778c310 emuMB: default to disabled mouse button emulation for touchscreens.
Because touchscreens only use one button (see EvdevProcessKeyEvent())
EvdevMBEmuFilterEvent() never calls EvdevMBEmuEnable(..., FALSE) to
disable emulation. This results in touchscreen devices incurring a delay
of Emulate3Timeout (typically 50 ms.)

Default to MBEMU_DISABLED for touchscreen devices (unless overwritten by
Xorg.conf.)

Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-25 16:07:39 +10:00
Peter Hutterer
99505011d1 man: fix man page formatting for option EmulateWheel.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-18 19:02:40 +10:00
Gaetan Nadon
fd036680c2 config: move CWARNFLAGS from configure.ac to Makefile.am
Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-11 10:08:07 -05:00
Andrej Gelenberg
e81cd935cf Implement XSetDeviceMode request handler
Implement XSetDeviceMode request handler for evdev.
Devices with absolute axes can be switched in relative
mode or absolute mode. Devices with relative axes
can be switched only in relative mode. Other devices
return BadMatch, cause they have no valuators and
don't report motion events.

New option "Mode" force devices with absolute axes
to work in relative or absolute mode.

Need xinputproto.

Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
2010-01-19 21:40:06 +13:00