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