Commit 266c3d68 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Lift Xi to 1.3.0.0 (identical to 1.2.0)

parent 70b49467
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
......@@ -174,6 +174,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
}
if (xE->u.u.type == DeviceKeyPress) {
if (!k)
return;
modifiers = k->modifierMap[key];
kptr = &k->down[key >> 3];
if (*kptr & bit) { /* allow ddx to generate multiple downs */
......@@ -203,6 +206,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
return;
}
} else if (xE->u.u.type == DeviceKeyRelease) {
if (!k)
return;
kptr = &k->down[key >> 3];
if (!(*kptr & bit)) /* guard against duplicates */
return;
......@@ -225,6 +231,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
if (other->fromPassiveGrab && (key == other->activatingKey))
deactivateDeviceGrab = TRUE;
} else if (xE->u.u.type == DeviceButtonPress) {
if (!b)
return;
kptr = &b->down[key >> 3];
*kptr |= bit;
if (other->valuator)
......@@ -242,6 +251,9 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count)
return;
} else if (xE->u.u.type == DeviceButtonRelease) {
if (!b)
return;
kptr = &b->down[key >> 3];
*kptr &= ~bit;
if (other->valuator)
......@@ -1075,6 +1087,9 @@ MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask)
DeviceIntPtr dev;
dev = LookupDeviceIntRec(pEvents->deviceid & DEVICE_BITS);
if (!dev)
return 0;
if (pEvents->type == DeviceMotionNotify) {
if (mask & DevicePointerMotionHintMask) {
if (WID(dev->valuator->motionHintWindow) == pEvents->event) {
......@@ -1096,6 +1111,9 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type,
DeviceIntPtr dev;
dev = LookupDeviceIntRec(xE->deviceid & DEVICE_BITS);
if (!dev)
return;
if (type == DeviceMotionNotify)
dev->valuator->motionHintWindow = pWin;
else if ((type == DeviceButtonPress) && (!grab) &&
......
/************************************************************
Copyright 1989, 1998 The Open Group
......@@ -576,8 +575,7 @@ SEventDeviceValuator(deviceValuator * from, deviceValuator * to)
swaps(&to->sequenceNumber);
swaps(&to->device_state);
ip = &to->valuator0;
for (i=0; i<6; i++)
{
for (i = 0; i < 6; i++) {
swapl((ip + i)); /* macro - braces are required */
}
}
......@@ -822,7 +820,7 @@ IResetProc(ExtensionEntry * unused)
*
*/
void
void
AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name)
{
dev->type = type;
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
......@@ -44,7 +44,6 @@ SOFTWARE.
********************************************************/
/***********************************************************************
*
* Extension function to get the current selected events for a given window.
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......@@ -142,8 +141,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client)
size = sizeof(Time) + (axes * sizeof(INT32));
tsize = num_events * size;
coords = (INT32 *) malloc(tsize);
if (!coords)
{
if (!coords) {
SendErrorToClient(client, IReqCode, X_GetDeviceMotionEvents, 0,
BadAlloc);
return Success;
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......@@ -163,7 +162,7 @@ ProcXOpenDevice(register ClientPtr client)
rep.length = (j * sizeof(xInputClassInfo) + 3) >> 2;
rep.num_classes = j;
WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep);
WriteToClient(client, j * sizeof (xInputClassInfo), evbase);
WriteToClient(client, j * sizeof(xInputClassInfo), evbase);
return (Success);
}
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
/************************************************************
Copyright 1989, 1998 The Open Group
......
......@@ -18,5 +18,5 @@ record 1.4.2
render 6.9/7.0
Xext 7.1/1.1
xfixes 1.4.2
Xi 7.1/1.1
Xi 1.3.0.0
xkb 7.1/1.1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment