Compare commits

..

7 Commits

Author SHA1 Message Date
Peter Hutterer
f48abf89e4 evdev 2.1.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-17 16:17:30 +10:00
Peter Hutterer
87819fe86b man: Fix two minor typos in man page.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0de20a8f1b)
2009-02-17 16:11:06 +10:00
Peter Hutterer
ffa1fbc770 Log which EVIOCGABS ioctl failed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 95099cb036)
2009-02-17 16:08:47 +10:00
Peter Hutterer
40bb3c69ce Remove duplicate MB emu finalization.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 32242871f7)
2009-02-17 16:08:42 +10:00
Bryce Harrington
675218cbf5 Add descriptive messages for device-has-changed errs
As can be seen in e.g. bugs 19819 & 20025, it can be unclear what
exactly caused a given "Device has changed - disabled" error.  This
patch adds some more specific messages to give a better clue on what
exactly was seen to have changed.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 2a6c1d7a60)
2009-02-13 13:19:59 +10:00
Julien Plissonneau Duquene
ad834abd57 EvdevCacheCompare: ignore changes in current device position
Input devices (especially touchscreens) were disabled when switching
virtual console back to X because EvdevCacheCompare() thought the device
was substituted by another while away from X. Actually only the current
position reported by the device changed from what was in the cache. Fixed
by ignoring the current position in the comparison.

Fixes bug #19819.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0dbb88c52b)
2009-02-13 13:19:50 +10:00
Peter Breitenlohner
3549c3e5f0 fix manpage formatting
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit c928156702)
2009-02-13 13:19:46 +10:00
3 changed files with 40 additions and 25 deletions

View File

@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-input-evdev],
2.1.2,
2.1.3,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-input-evdev)

View File

@@ -155,7 +155,7 @@ Force a grab on the event device. Doing so will ensure that no other driver
can initialise the same device and it will also stop the device from sending
events to /dev/kbd or /dev/input/mice. Events from this device will not be
sent to virtual devices (e.g. rfkill or the Macintosh mouse button emulation).
Default disabled.
Default: disabled.
.SH SUPPORTED PROPERTIES
The following properties are provided by the
@@ -189,6 +189,7 @@ value.
.TP 7
.BI "Evdev Axis Inversion"
2 boolean values (8 bit, 0 or 1), order X, Y. 1 inverts the axis.
.TP 7
.BI "Evdev Axis Calibration"
4 32-bit values, order min-x, max-x, min-y, max-y or 0 values to disable
run-time axis calibration. This feature is required for devices that need to
@@ -196,7 +197,7 @@ scale to a different coordinate system than originally reported to the X
server, such as touchscreens that require run-time calibration.
.TP 7
.BI "Evdev Axis Swap"
1 boolean values (8 bit, 0 or 1). 1 swaps x/y axes.
1 boolean value (8 bit, 0 or 1). 1 swaps x/y axes.
.SH AUTHORS
Kristian Høgsberg.

View File

@@ -891,13 +891,13 @@ EvdevAddAbsClass(DeviceIntPtr device)
if (ioctl(pInfo->fd,
EVIOCGABS(ABS_X), &absinfo_x) < 0) {
xf86Msg(X_ERROR, "ioctl EVIOCGABS failed: %s\n", strerror(errno));
xf86Msg(X_ERROR, "ioctl EVIOCGABS ABS_X failed: %s\n", strerror(errno));
return !Success;
}
if (ioctl(pInfo->fd,
EVIOCGABS(ABS_Y), &absinfo_y) < 0) {
xf86Msg(X_ERROR, "ioctl EVIOCGABS failed: %s\n", strerror(errno));
xf86Msg(X_ERROR, "ioctl EVIOCGABS ABS_Y failed: %s\n", strerror(errno));
return !Success;
}
@@ -1161,8 +1161,6 @@ EvdevProc(DeviceIntPtr device, int what)
pInfo->fd = -1;
}
pEvdev->min_maj = 0;
if (pEvdev->flags & EVDEV_INITIALIZED)
EvdevMBEmuFinalize(pInfo);
pEvdev->flags &= ~EVDEV_INITIALIZED;
device->public.on = FALSE;
if (pEvdev->reopen_timer)
@@ -1214,54 +1212,66 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
goto error;
}
if (compare && strcmp(pEvdev->name, name))
goto error;
if (ioctl(pInfo->fd,
EVIOCGBIT(0, sizeof(bitmask)), bitmask) < 0) {
xf86Msg(X_ERROR, "ioctl EVIOCGBIT failed: %s\n", strerror(errno));
if (compare && strcmp(pEvdev->name, name)) {
xf86Msg(X_ERROR, "%s: device name changed: %s != %s\n", pInfo->name, pEvdev->name, name);
goto error;
}
if (compare && memcmp(pEvdev->bitmask, bitmask, sizeof(bitmask)))
if (ioctl(pInfo->fd,
EVIOCGBIT(0, sizeof(bitmask)), bitmask) < 0) {
xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n", pInfo->name, strerror(errno));
goto error;
}
if (compare && memcmp(pEvdev->bitmask, bitmask, sizeof(bitmask))) {
xf86Msg(X_ERROR, "%s: device bitmask has changed\n", pInfo->name);
goto error;
}
if (ioctl(pInfo->fd,
EVIOCGBIT(EV_REL, sizeof(rel_bitmask)), rel_bitmask) < 0) {
xf86Msg(X_ERROR, "ioctl EVIOCGBIT failed: %s\n", strerror(errno));
xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n", pInfo->name, strerror(errno));
goto error;
}
if (compare && memcmp(pEvdev->rel_bitmask, rel_bitmask, sizeof(rel_bitmask)))
if (compare && memcmp(pEvdev->rel_bitmask, rel_bitmask, sizeof(rel_bitmask))) {
xf86Msg(X_ERROR, "%s: device rel_bitmask has changed\n", pInfo->name);
goto error;
}
if (ioctl(pInfo->fd,
EVIOCGBIT(EV_ABS, sizeof(abs_bitmask)), abs_bitmask) < 0) {
xf86Msg(X_ERROR, "ioctl EVIOCGBIT failed: %s\n", strerror(errno));
xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n", pInfo->name, strerror(errno));
goto error;
}
if (compare && memcmp(pEvdev->abs_bitmask, abs_bitmask, sizeof(abs_bitmask)))
if (compare && memcmp(pEvdev->abs_bitmask, abs_bitmask, sizeof(abs_bitmask))) {
xf86Msg(X_ERROR, "%s: device abs_bitmask has changed\n", pInfo->name);
goto error;
}
if (ioctl(pInfo->fd,
EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask) < 0) {
xf86Msg(X_ERROR, "ioctl EVIOCGBIT failed: %s\n", strerror(errno));
xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n", pInfo->name, strerror(errno));
goto error;
}
if (compare && memcmp(pEvdev->key_bitmask, key_bitmask, sizeof(key_bitmask)))
if (compare && memcmp(pEvdev->key_bitmask, key_bitmask, sizeof(key_bitmask))) {
xf86Msg(X_ERROR, "%s: device key_bitmask has changed\n", pInfo->name);
goto error;
}
if (ioctl(pInfo->fd,
EVIOCGBIT(EV_LED, sizeof(led_bitmask)), led_bitmask) < 0) {
xf86Msg(X_ERROR, "ioctl EVIOCGBIT failed: %s\n", strerror(errno));
xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n", pInfo->name, strerror(errno));
goto error;
}
if (compare && memcmp(pEvdev->led_bitmask, led_bitmask, sizeof(led_bitmask)))
if (compare && memcmp(pEvdev->led_bitmask, led_bitmask, sizeof(led_bitmask))) {
xf86Msg(X_ERROR, "%s: device led_bitmask has changed\n", pInfo->name);
goto error;
}
memset(absinfo, 0, sizeof(absinfo));
@@ -1270,14 +1280,18 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
if (TestBit(i, abs_bitmask))
{
if (ioctl(pInfo->fd, EVIOCGABS(i), &absinfo[i]) < 0) {
xf86Msg(X_ERROR, "ioctl EVIOCGABS failed: %s\n", strerror(errno));
xf86Msg(X_ERROR, "%s: ioctl EVIOCGABS failed: %s\n", pInfo->name, strerror(errno));
goto error;
}
/* ignore current position (value) in comparison (bug #19819) */
absinfo[i].value = pEvdev->absinfo[i].value;
}
}
if (compare && memcmp(pEvdev->absinfo, absinfo, sizeof(absinfo)))
goto error;
if (compare && memcmp(pEvdev->absinfo, absinfo, sizeof(absinfo))) {
xf86Msg(X_ERROR, "%s: device absinfo has changed\n", pInfo->name);
goto error;
}
/* cache info */
if (!compare)