Compare commits

..

15 Commits

Author SHA1 Message Date
Daniel Stone
5a5457e69c bump to 1.1.4 2006-11-02 03:42:57 +02:00
Daniel Stone
3fc70342aa Merge branch 'input-hotplug' 2006-11-02 03:42:14 +02:00
Daniel Stone
1a8cea3dc4 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-input-evdev 2006-11-02 03:42:13 +02:00
Daniel Stone
ef01c2ef65 key: use os bell-ringing function
Use the OS bell-ringing function to ding the bell.
2006-11-02 03:41:48 +02:00
Daniel Stone
036b457c1b support new DIX motion history API
Use the DIX motion history if we have ABI version 1 or higher.
2006-10-25 02:22:46 +03:00
Daniel Stone
79eb7dcac8 Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-input-evdev into input-hotplug 2006-10-17 11:32:39 +03:00
Daniel Stone
d7f686bfa3 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-input-evdev into input-hotplug 2006-10-17 11:31:58 +03:00
Daniel Stone
ec09e0d55d brain: call xf86DeleteInput when removing device
Call xf86DeleteInput from evdevRemoveDevice, so it also gets removed from
xf86InputDevs in the DDX.
2006-10-15 19:37:46 +03:00
Daniel Stone
77cbbc20b6 key: remove usage of OS keyboard layer for bell
Right now, bell is a no-op.
2006-10-08 16:14:12 +03:00
Zephaniah E. Hull
63f7edf786 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-input-evdev into input-hotplug 2006-07-25 16:00:44 -04:00
Daniel Stone
e468150448 fix InitValuatorClassDeviceStruct call
I don't know how the last parameter got there.  Sorry.
2006-07-21 14:38:12 -04:00
Daniel Stone
7b91f9277a pass maxval correctly to xf86InitValuatorAxisDeviceStruct
Pass a maxval of -1 (i.e., fill this in appropriately), rather than 0 (0).
2006-07-19 19:45:27 -04:00
Daniel Stone
7defeb0aef pass number of axes to InitValuatorClassDeviceStruct
This is now required with the input-hotplug server.
2006-07-19 19:43:08 -04:00
Daniel Stone
1cb568c0a6 prune device list on DEVICE_CLOSE
Remove a device from the device list when we get DEVICE_CLOSE.
2006-07-19 19:41:54 -04:00
Daniel Stone
51d21a3694 remove XFree86LOADER usage
Build evdevModuleData, et al, unconditionally.
2006-07-09 18:08:50 +01:00
6 changed files with 40 additions and 8 deletions

View File

@@ -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)

View File

@@ -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 */

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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)
{

View File

@@ -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