dix: change GetEventList to return length of list and set parameter in place.
Changing DDXs to use new prototype too.
This commit is contained in:
parent
77dba004a9
commit
74628d6397
|
@ -77,10 +77,11 @@ extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies);
|
|||
EventListPtr InputEventList = NULL;
|
||||
int InputEventListLen = 0;
|
||||
|
||||
_X_EXPORT EventListPtr
|
||||
GetEventList()
|
||||
_X_EXPORT int
|
||||
GetEventList(EventListPtr* list)
|
||||
{
|
||||
return InputEventList;
|
||||
*list = InputEventList;
|
||||
return InputEventListLen;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -65,7 +65,7 @@ static struct KdConfigDevice *kdConfigPointers = NULL;
|
|||
static KdKeyboardDriver *kdKeyboardDrivers = NULL;
|
||||
static KdPointerDriver *kdPointerDrivers = NULL;
|
||||
|
||||
static EventListPtr *kdEvents = NULL;
|
||||
static EventListPtr kdEvents = NULL;
|
||||
|
||||
static Bool kdInputEnabled;
|
||||
static Bool kdOffScreen;
|
||||
|
@ -1979,7 +1979,7 @@ KdReleaseAllKeys (void)
|
|||
key++) {
|
||||
if (IsKeyDown(ki, key)) {
|
||||
KdHandleKeyboardEvent(ki, KeyRelease, key);
|
||||
kdEvents = GetEventList();
|
||||
GetEventList(&kdEvents);
|
||||
nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, KeyRelease, key);
|
||||
for (i = 0; i < nEvents; i++)
|
||||
KdQueueEvent (ki->dixdev, kdEvents + i);
|
||||
|
@ -2044,7 +2044,7 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo *ki,
|
|||
KdHandleKeyboardEvent(ki, type, key_code);
|
||||
}
|
||||
|
||||
kdEvents = GetEventList();
|
||||
GetEventList(&kdEvents);
|
||||
nEvents = GetKeyboardEvents(kdEvents, ki->dixdev, type, key_code);
|
||||
for (i = 0; i < nEvents; i++)
|
||||
KdQueueEvent(ki->dixdev, kdEvents);
|
||||
|
@ -2145,7 +2145,7 @@ _KdEnqueuePointerEvent (KdPointerInfo *pi, int type, int x, int y, int z,
|
|||
if (!force && KdHandlePointerEvent(pi, type, x, y, z, b, absrel))
|
||||
return;
|
||||
|
||||
kdEvents = GetEventList();
|
||||
GetEventList(&kdEvents);
|
||||
nEvents = GetPointerEvents(kdEvents, pi->dixdev, type, b, absrel,
|
||||
0, 3, valuators);
|
||||
for (i = 0; i < nEvents; i++)
|
||||
|
|
|
@ -569,7 +569,7 @@ xf86PostMotionEventP(DeviceIntPtr device,
|
|||
}
|
||||
#endif
|
||||
|
||||
xf86Events = GetEventList();
|
||||
GetEventList(&xf86Events);
|
||||
nevents = GetPointerEvents(xf86Events, device, MotionNotify, 0,
|
||||
flags, first_valuator, num_valuators,
|
||||
valuators);
|
||||
|
@ -601,7 +601,7 @@ xf86PostProximityEvent(DeviceIntPtr device,
|
|||
valuators[i] = va_arg(var, int);
|
||||
va_end(var);
|
||||
|
||||
xf86Events = GetEventList();
|
||||
GetEventList(&xf86Events);
|
||||
nevents = GetProximityEvents(xf86Events, device,
|
||||
is_in ? ProximityIn : ProximityOut,
|
||||
first_valuator, num_valuators, valuators);
|
||||
|
@ -639,7 +639,7 @@ xf86PostButtonEvent(DeviceIntPtr device,
|
|||
valuators[i] = va_arg(var, int);
|
||||
va_end(var);
|
||||
|
||||
xf86Events = GetEventList();
|
||||
GetEventList(&xf86Events);
|
||||
nevents = GetPointerEvents(xf86Events, device,
|
||||
is_down ? ButtonPress : ButtonRelease, button,
|
||||
(is_absolute) ? POINTER_ABSOLUTE : POINTER_RELATIVE,
|
||||
|
@ -675,7 +675,7 @@ xf86PostKeyEvent(DeviceIntPtr device,
|
|||
valuators[i] = va_arg(var, int);
|
||||
va_end(var);
|
||||
|
||||
xf86Events = GetEventList();
|
||||
GetEventList(&xf86Events);
|
||||
nevents = GetKeyboardValuatorEvents(xf86Events, device,
|
||||
is_down ? KeyPress : KeyRelease,
|
||||
key_code, first_valuator,
|
||||
|
@ -710,7 +710,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device,
|
|||
}
|
||||
#endif
|
||||
|
||||
xf86Events = GetEventList();
|
||||
GetEventList(&xf86Events);
|
||||
nevents = GetKeyboardEvents(xf86Events, device,
|
||||
is_down ? KeyPress : KeyRelease, key_code);
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@ extern void InitInput(
|
|||
|
||||
extern int GetMaximumEventsNum(void);
|
||||
|
||||
extern EventListPtr GetEventList();
|
||||
extern int GetEventList(EventListPtr* list);
|
||||
extern EventListPtr InitEventList(int num_events);
|
||||
extern void SetMinimumEventSize(EventListPtr list,
|
||||
int num_events,
|
||||
|
|
Loading…
Reference in New Issue