mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
Compare commits
8 Commits
xf86-input
...
xf86-input
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
891bfc56be | ||
|
|
6626ad5cb9 | ||
|
|
ae247ff09c | ||
|
|
46f2b83e01 | ||
|
|
d73a1732c6 | ||
|
|
8c332a8367 | ||
|
|
91e30bb07c | ||
|
|
36d9b9f166 |
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.57)
|
||||||
AC_INIT([xf86-input-evdev],
|
AC_INIT([xf86-input-evdev],
|
||||||
2.0.5,
|
2.0.8,
|
||||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||||
xf86-input-evdev)
|
xf86-input-evdev)
|
||||||
|
|
||||||
|
|||||||
17
src/evdev.c
17
src/evdev.c
@@ -155,6 +155,10 @@ PostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value)
|
|||||||
warned[ev->code] = 1;
|
warned[ev->code] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The X server can't handle keycodes > 255 anyway, just drop them. */
|
||||||
|
if (code > 255)
|
||||||
|
return;
|
||||||
|
|
||||||
xf86PostKeyboardEvent(pInfo->dev, code, value);
|
xf86PostKeyboardEvent(pInfo->dev, code, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,12 +180,10 @@ EvdevReopenTimer(OsTimerPtr timer, CARD32 time, pointer arg)
|
|||||||
|
|
||||||
if (pInfo->fd != -1)
|
if (pInfo->fd != -1)
|
||||||
{
|
{
|
||||||
pEvdev->reopen_left = 0;
|
|
||||||
|
|
||||||
if (EvdevCacheCompare(pInfo, TRUE) == Success)
|
if (EvdevCacheCompare(pInfo, TRUE) == Success)
|
||||||
{
|
{
|
||||||
xf86Msg(X_INFO, "%s: Device reopened after %d attempts.\n", pInfo->name,
|
xf86Msg(X_INFO, "%s: Device reopened after %d attempts.\n", pInfo->name,
|
||||||
pEvdev->reopen_attempts - pEvdev->reopen_left);
|
pEvdev->reopen_attempts - pEvdev->reopen_left + 1);
|
||||||
EvdevOn(pInfo->dev);
|
EvdevOn(pInfo->dev);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -191,6 +193,7 @@ EvdevReopenTimer(OsTimerPtr timer, CARD32 time, pointer arg)
|
|||||||
close(pInfo->fd);
|
close(pInfo->fd);
|
||||||
pInfo->fd = -1;
|
pInfo->fd = -1;
|
||||||
}
|
}
|
||||||
|
pEvdev->reopen_left = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,7 +381,7 @@ EvdevReadInput(InputInfoPtr pInfo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TestBit(bit, array) (array[(bit) / LONG_BITS]) & (1 << ((bit) % LONG_BITS))
|
#define TestBit(bit, array) (array[(bit) / LONG_BITS]) & (1L << ((bit) % LONG_BITS))
|
||||||
|
|
||||||
static void
|
static void
|
||||||
EvdevPtrCtrlProc(DeviceIntPtr device, PtrCtrl *ctrl)
|
EvdevPtrCtrlProc(DeviceIntPtr device, PtrCtrl *ctrl)
|
||||||
@@ -970,6 +973,8 @@ EvdevProc(DeviceIntPtr device, int what)
|
|||||||
xf86Msg(X_WARNING, "%s: Release failed (%s)\n", pInfo->name,
|
xf86Msg(X_WARNING, "%s: Release failed (%s)\n", pInfo->name,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
xf86RemoveEnabledDevice(pInfo);
|
xf86RemoveEnabledDevice(pInfo);
|
||||||
|
close(pInfo->fd);
|
||||||
|
pInfo->fd = -1;
|
||||||
}
|
}
|
||||||
if (pEvdev->flags & EVDEV_INITIALIZED)
|
if (pEvdev->flags & EVDEV_INITIALIZED)
|
||||||
EvdevMBEmuFinalize(pInfo);
|
EvdevMBEmuFinalize(pInfo);
|
||||||
@@ -984,8 +989,10 @@ EvdevProc(DeviceIntPtr device, int what)
|
|||||||
|
|
||||||
case DEVICE_CLOSE:
|
case DEVICE_CLOSE:
|
||||||
xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
|
xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
|
||||||
if (pInfo->fd != -1)
|
if (pInfo->fd != -1) {
|
||||||
close(pInfo->fd);
|
close(pInfo->fd);
|
||||||
|
pInfo->fd = -1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user