Xi: remove DeviceIsPointerType

This approach is broken anyway. DIPT only checked for the XInput type
"MOUSE" and the only user of this is xf86ActivateDevice when it sets the
Activate/DeactivateGrab functions.
Since synaptics and wacom set their own types, evdev only sets MOUSE for,
well, mice half the devices didn't have this set correctly anyway.

Instead, ActivatePointerGrab should be merged together with
ActivateKeyboardGrab.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-05-20 13:59:22 +10:00
parent 7b891e450f
commit 47a89b1cba
3 changed files with 2 additions and 29 deletions

View File

@ -1069,21 +1069,6 @@ IResetProc(ExtensionEntry * unused)
RestoreExtensionEvents();
}
/*****************************************************************
*
* Returns TRUE if the device has some sort of pointer type.
*
*/
Bool
DeviceIsPointerType(DeviceIntPtr dev)
{
if (dev_type[1].type == dev->type)
return TRUE;
return FALSE;
}
/***********************************************************************
*

View File

@ -326,15 +326,8 @@ xf86ActivateDevice(LocalDevicePtr local)
dev->isMaster = FALSE;
dev->spriteInfo->spriteOwner = FALSE;
if (DeviceIsPointerType(dev))
{
dev->deviceGrab.ActivateGrab = ActivatePointerGrab;
dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab;
} else
{
dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
}
dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab;
dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab;
RegisterOtherDevice(dev);
XkbSetExtension(dev, ProcessKeyboardEvent);

View File

@ -37,11 +37,6 @@ XInputExtensionInit(
void
);
extern _X_EXPORT Bool
DeviceIsPointerType(
DeviceIntPtr dev
);
extern _X_EXPORT void
AssignTypeAndName (
DeviceIntPtr /* dev */,