mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
Compare commits
7 Commits
xf86-input
...
xf86-input
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f48abf89e4 | ||
|
|
87819fe86b | ||
|
|
ffa1fbc770 | ||
|
|
40bb3c69ce | ||
|
|
675218cbf5 | ||
|
|
ad834abd57 | ||
|
|
3549c3e5f0 |
@@ -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)
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
58
src/evdev.c
58
src/evdev.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user