xfree86: fix xf86ActivateDevice(): only set to MP device if not a keyboard
This commit is contained in:
parent
202b46eb6b
commit
b55e1239ac
|
@ -21,6 +21,15 @@ Files:
|
|||
|
||||
Note: This commit requires libXi additions to use the new functions.
|
||||
|
||||
____________________________________________________________
|
||||
|
||||
xfree86: fix xf86ActivateDevice(): only set to MP device if not a keyboard
|
||||
|
||||
Files:
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
include/extinit.h
|
||||
Xi/extinit.c
|
||||
|
||||
== 18.12.06 ==
|
||||
mi: removing MPX ifdefs
|
||||
global sprite renaming in mipointer and misprite
|
||||
|
|
15
Xi/extinit.c
15
Xi/extinit.c
|
@ -866,6 +866,21 @@ AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name)
|
|||
strcpy(dev->name, name);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Returns true if a device may require a pointer (is not a keyboard).
|
||||
*
|
||||
*/
|
||||
_X_EXPORT Bool
|
||||
MayNeedPointer(DeviceIntPtr dev)
|
||||
{
|
||||
/* return false if device is a keyboard */
|
||||
if (dev_type[0].type == dev->type)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Make device type atoms.
|
||||
|
|
|
@ -171,7 +171,8 @@ xf86ActivateDevice(LocalDevicePtr local)
|
|||
local->dev = dev;
|
||||
|
||||
dev->coreEvents = local->flags & XI86_ALWAYS_CORE;
|
||||
dev->isMPDev = !(local->flags & XI86_SHARED_POINTER);
|
||||
dev->isMPDev =
|
||||
MayNeedPointer(dev) && !(local->flags & XI86_SHARED_POINTER);
|
||||
InitSprite(dev, dev->isMPDev);
|
||||
|
||||
RegisterOtherDevice(dev);
|
||||
|
|
|
@ -131,6 +131,10 @@ AssignTypeAndName (
|
|||
char * /* name */
|
||||
);
|
||||
|
||||
Bool MayNeedPointer(
|
||||
DeviceIntPtr /* dev */
|
||||
);
|
||||
|
||||
void
|
||||
MakeDeviceTypeAtoms (
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue