mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
Compare commits
15 Commits
xf86-input
...
xf86-input
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a5457e69c | ||
|
|
3fc70342aa | ||
|
|
1a8cea3dc4 | ||
|
|
ef01c2ef65 | ||
|
|
036b457c1b | ||
|
|
79eb7dcac8 | ||
|
|
d7f686bfa3 | ||
|
|
ec09e0d55d | ||
|
|
77cbbc20b6 | ||
|
|
63f7edf786 | ||
|
|
e468150448 | ||
|
|
7b91f9277a | ||
|
|
7defeb0aef | ||
|
|
1cb568c0a6 | ||
|
|
51d21a3694 |
@@ -22,7 +22,7 @@
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xf86-input-evdev],
|
||||
1.1.3,
|
||||
1.1.4,
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
||||
xf86-input-evdev)
|
||||
|
||||
|
||||
10
src/evdev.c
10
src/evdev.c
@@ -214,6 +214,9 @@ EvdevProc(DeviceIntPtr device, int what)
|
||||
EvdevKeyOff (device);
|
||||
}
|
||||
|
||||
if (what == DEVICE_CLOSE)
|
||||
evdevRemoveDevice(pEvdev);
|
||||
|
||||
device->public.on = FALSE;
|
||||
break;
|
||||
}
|
||||
@@ -238,10 +241,12 @@ EvdevSwitchMode (ClientPtr client, DeviceIntPtr device, int mode)
|
||||
else
|
||||
return !Success;
|
||||
break;
|
||||
#if 0
|
||||
case SendCoreEvents:
|
||||
case DontSendCoreEvents:
|
||||
xf86XInputSetSendCoreEvents (pInfo, (mode == SendCoreEvents));
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return !Success;
|
||||
}
|
||||
@@ -268,7 +273,9 @@ EvdevNew(evdevDriverPtr driver, evdevDevicePtr device)
|
||||
pInfo->device_control = EvdevProc;
|
||||
pInfo->read_input = EvdevReadInput;
|
||||
pInfo->switch_mode = EvdevSwitchMode;
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
|
||||
pInfo->motion_history_proc = xf86GetMotionEvents;
|
||||
#endif
|
||||
pInfo->conf_idev = driver->dev;
|
||||
|
||||
pInfo->private = device;
|
||||
@@ -459,8 +466,6 @@ _X_EXPORT InputDriverRec EVDEV = {
|
||||
0
|
||||
};
|
||||
|
||||
#ifdef XFree86LOADER
|
||||
|
||||
static void
|
||||
EvdevUnplug(pointer p)
|
||||
{
|
||||
@@ -496,4 +501,3 @@ _X_EXPORT XF86ModuleData evdevModuleData =
|
||||
EvdevPlug,
|
||||
EvdevUnplug
|
||||
};
|
||||
#endif /* XFree86LOADER */
|
||||
|
||||
@@ -252,6 +252,7 @@ int evdevGetFDForDevice (evdevDevicePtr driver);
|
||||
Bool evdevStart (InputDriverPtr drv);
|
||||
Bool evdevNewDriver (evdevDriverPtr driver);
|
||||
Bool evdevGetBits (int fd, evdevBitsPtr bits);
|
||||
void evdevRemoveDevice (evdevDevicePtr device);
|
||||
|
||||
int EvdevBtnInit (DeviceIntPtr device);
|
||||
int EvdevBtnOn (DeviceIntPtr device);
|
||||
|
||||
@@ -672,8 +672,14 @@ EvdevAxesInit (DeviceIntPtr device)
|
||||
return Success;
|
||||
|
||||
if (!InitValuatorClassDeviceStruct(device, axes,
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 1
|
||||
GetMotionHistory,
|
||||
GetMotionHistorySize(),
|
||||
#else
|
||||
miPointerGetMotionEvents,
|
||||
miPointerGetMotionBufferSize(), 0))
|
||||
miPointerGetMotionBufferSize(),
|
||||
#endif
|
||||
0))
|
||||
return !Success;
|
||||
|
||||
for (i = 0; i < axes; i++) {
|
||||
@@ -684,7 +690,9 @@ EvdevAxesInit (DeviceIntPtr device)
|
||||
if (!InitPtrFeedbackClassDeviceStruct(device, EvdevPtrCtrlProc))
|
||||
return !Success;
|
||||
|
||||
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
|
||||
xf86MotionHistoryAllocate (pInfo);
|
||||
#endif
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
@@ -462,6 +462,24 @@ evdevNewDriver (evdevDriverPtr driver)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
evdevRemoveDevice (evdevDevicePtr pEvdev)
|
||||
{
|
||||
evdevDriverPtr driver;
|
||||
evdevDevicePtr *device;
|
||||
|
||||
for (driver = evdev_drivers; driver; driver = driver->next) {
|
||||
for (device = &driver->devices; *device; device = &(*device)->next) {
|
||||
if (*device == pEvdev) {
|
||||
*device = pEvdev->next;
|
||||
xf86DeleteInput(pEvdev->pInfo, 0);
|
||||
pEvdev->next = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Bool
|
||||
evdevGetBits (int fd, evdevBitsPtr bits)
|
||||
{
|
||||
|
||||
@@ -238,10 +238,11 @@ static KeySym map[] = {
|
||||
* So use the system bell for now.
|
||||
*/
|
||||
static void
|
||||
EvdevKbdBell (int percent, DeviceIntPtr device, pointer ctrl, int unused)
|
||||
EvdevKbdBell (int percent, DeviceIntPtr device, pointer arg, int unused)
|
||||
{
|
||||
xf86SoundKbdBell(percent, ((KeybdCtrl*) ctrl)->bell_pitch,
|
||||
((KeybdCtrl*) ctrl)->bell_duration);
|
||||
KeybdCtrl *ctrl = arg;
|
||||
|
||||
xf86OSRingBell(percent, ctrl->bell_pitch, ctrl->bell_duration);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user