<p><br>
On Apr 14, 2011 11:32 PM, "Jeremy Huddleston" <<a href="mailto:jeremyhu@apple.com">jeremyhu@apple.com</a>> wrote:<br>
><br>
> There's a whole bunch of other crap in ddx/xquartz/darwinEvents.c regarding our EventListPtr/InternalEvent* that can get gutted because of these changes. This should make things a bit cleaner, thanks!</p>
<p>Will let me finally clean up AndroiX as well, in time for native 2.3 support. --tmzt<br>
><br>
> Reviewed-by: Jeremy Huddleston <<a href="mailto:jeremyhu@apple.com">jeremyhu@apple.com</a>><br>
><br>
> On Apr 14, 2011, at 7:47 PM, Peter Hutterer wrote:<br>
><br>
> > The current approach to event posting required the DDX to request the event<br>
> > list (allocated by the DIX) and then pass that list into QueuePointerEvent<br>
> > and friends.<br>
> ><br>
> > Remove this step and use the DIX event list directly. This means that<br>
> > QueuePointerEvent is not reentrant but it wasn't before anyway.<br>
> ><br>
> > Signed-off-by: Peter Hutterer <<a href="mailto:peter.hutterer@who-t.net">peter.hutterer@who-t.net</a>><br>
> > ---<br>
> > dix/events.c | 6 +---<br>
> > dix/getevents.c | 43 +++++++++++++++------------------------<br>
> > hw/dmx/input/dmxevents.c | 28 +++++++------------------<br>
> > hw/kdrive/src/kinput.c | 11 ++-------<br>
> > hw/xfree86/common/xf86Events.c | 2 +-<br>
> > hw/xfree86/common/xf86Init.c | 2 -<br>
> > hw/xfree86/common/xf86Priv.h | 3 --<br>
> > hw/xfree86/common/xf86Xinput.c | 11 +++------<br>
> > hw/xnest/Events.c | 14 ++++--------<br>
> > hw/xnest/Init.c | 4 ---<br>
> > hw/xquartz/darwinEvents.c | 6 ++--<br>
> > hw/xwin/winkeybd.c | 3 +-<br>
> > hw/xwin/winmouse.c | 8 +-----<br>
> > include/input.h | 5 ----<br>
> > 14 files changed, 46 insertions(+), 100 deletions(-)<br>
> ><br>
> > diff --git a/dix/events.c b/dix/events.c<br>
> > index 8835c5e..a944044 100644<br>
> > --- a/dix/events.c<br>
> > +++ b/dix/events.c<br>
> > @@ -5007,8 +5007,7 @@ InitEvents(void)<br>
> > DontPropagateRefCnts[i] = 0;<br>
> > }<br>
> ><br>
> > - InputEventListLen = GetMaximumEventsNum();<br>
> > - InputEventList = InitEventList(InputEventListLen);<br>
> > + InputEventList = InitEventList(GetMaximumEventsNum());<br>
> > if (!InputEventList)<br>
> > FatalError("[dix] Failed to allocate input event list.\n");<br>
> > }<br>
> > @@ -5016,8 +5015,7 @@ InitEvents(void)<br>
> > void<br>
> > CloseDownEvents(void)<br>
> > {<br>
> > - FreeEventList(InputEventList, InputEventListLen);<br>
> > - InputEventListLen = 0;<br>
> > + FreeEventList(InputEventList, GetMaximumEventsNum());<br>
> > InputEventList = NULL;<br>
> > }<br>
> ><br>
> > diff --git a/dix/getevents.c b/dix/getevents.c<br>
> > index d99b958..4f7c756 100644<br>
> > --- a/dix/getevents.c<br>
> > +++ b/dix/getevents.c<br>
> > @@ -69,19 +69,12 @@<br>
> > /* Number of motion history events to store. */<br>
> > #define MOTION_HISTORY_SIZE 256<br>
> ><br>
> > -/* InputEventList is the storage for input events generated by the<br>
> > - * DDX. The DDX is expected to call GetEventList() and then pass the list into<br>
> > - * Get{Pointer|Keyboard}Events.<br>
> > +/**<br>
> > + * InputEventList is the storage for input events generated by<br>
> > + * QueuePointerEvents, QueueKeyboardEvents, and QueueProximityEvents.<br>
> > + * This list is allocated on startup by the DIX.<br>
> > */<br>
> > InternalEvent* InputEventList = NULL;<br>
> > -int InputEventListLen = 0;<br>
> > -<br>
> > -int<br>
> > -GetEventList(InternalEvent** list)<br>
> > -{<br>
> > - *list = InputEventList;<br>
> > - return InputEventListLen;<br>
> > -}<br>
> ><br>
> > /**<br>
> > * Pick some arbitrary size for Xi motion history.<br>
> > @@ -938,10 +931,10 @@ queueEventList(DeviceIntPtr device, InternalEvent *events, int nevents)<br>
> > * Generate internal events representing this keyboard event and enqueue<br>
> > * them on the event queue.<br>
> > *<br>
> > - * FIXME: don't require the event list to be passed in.<br>
> > + * This function is not reentrant. Disable signals before calling.<br>
> > + *<br>
> > * FIXME: flags for relative/abs motion?<br>
> > *<br>
> > - * @param events Event list used as temporary storage<br>
> > * @param device The device to generate the event for<br>
> > * @param type Event type, one of KeyPress or KeyRelease<br>
> > * @param keycode Key code of the pressed/released key<br>
> > @@ -949,13 +942,13 @@ queueEventList(DeviceIntPtr device, InternalEvent *events, int nevents)<br>
> > *<br>
> > */<br>
> > void<br>
> > -QueueKeyboardEvents(InternalEvent *events, DeviceIntPtr device, int type,<br>
> > +QueueKeyboardEvents(DeviceIntPtr device, int type,<br>
> > int keycode, const ValuatorMask *mask)<br>
> > {<br>
> > int nevents;<br>
> ><br>
> > - nevents = GetKeyboardEvents(events, device, type, keycode, mask);<br>
> > - queueEventList(device, events, nevents);<br>
> > + nevents = GetKeyboardEvents(InputEventList, device, type, keycode, mask);<br>
> > + queueEventList(device, InputEventList, nevents);<br>
> > }<br>
> ><br>
> > /**<br>
> > @@ -1084,9 +1077,8 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)<br>
> > * Generate internal events representing this pointer event and enqueue them<br>
> > * on the event queue.<br>
> > *<br>
> > - * FIXME: don't require the event list to be passed in.<br>
> > + * This function is not reentrant. Disable signals before calling.<br>
> > *<br>
> > - * @param events Set of events list used as temporary storage<br>
> > * @param device The device to generate the event for<br>
> > * @param type Event type, one of ButtonPress, ButtonRelease, MotionNotify<br>
> > * @param buttons Button number of the buttons modified. Must be 0 for<br>
> > @@ -1095,13 +1087,13 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)<br>
> > * @param mask Valuator mask for valuators present for this event.<br>
> > */<br>
> > void<br>
> > -QueuePointerEvents(InternalEvent *events, DeviceIntPtr device, int type,<br>
> > +QueuePointerEvents(DeviceIntPtr device, int type,<br>
> > int buttons, int flags, const ValuatorMask *mask)<br>
> > {<br>
> > int nevents;<br>
> ><br>
> > - nevents = GetPointerEvents(events, device, type, buttons, flags, mask);<br>
> > - queueEventList(device, events, nevents);<br>
> > + nevents = GetPointerEvents(InputEventList, device, type, buttons, flags, mask);<br>
> > + queueEventList(device, InputEventList, nevents);<br>
> > }<br>
> ><br>
> > /**<br>
> > @@ -1253,9 +1245,8 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type, int buttons<br>
> > * Generate internal events representing this proximity event and enqueue<br>
> > * them on the event queue.<br>
> > *<br>
> > - * FIXME: don't require the event list to be passed in.<br>
> > + * This function is not reentrant. Disable signals before calling.<br>
> > *<br>
> > - * @param events Event list used as temporary storage<br>
> > * @param device The device to generate the event for<br>
> > * @param type Event type, one of ProximityIn or ProximityOut<br>
> > * @param keycode Key code of the pressed/released key<br>
> > @@ -1263,13 +1254,13 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type, int buttons<br>
> > *<br>
> > */<br>
> > void<br>
> > -QueueProximityEvents(InternalEvent *events, DeviceIntPtr device, int type,<br>
> > +QueueProximityEvents(DeviceIntPtr device, int type,<br>
> > const ValuatorMask *mask)<br>
> > {<br>
> > int nevents;<br>
> ><br>
> > - nevents = GetProximityEvents(events, device, type, mask);<br>
> > - queueEventList(device, events, nevents);<br>
> > + nevents = GetProximityEvents(InputEventList, device, type, mask);<br>
> > + queueEventList(device, InputEventList, nevents);<br>
> > }<br>
> ><br>
> > /**<br>
> > diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c<br>
> > index 8aa1b80..41bc4bf 100644<br>
> > --- a/hw/dmx/input/dmxevents.c<br>
> > +++ b/hw/dmx/input/dmxevents.c<br>
> > @@ -177,15 +177,13 @@ static void enqueueMotion(DevicePtr pDev, int x, int y)<br>
> > GETDMXLOCALFROMPDEV;<br>
> > DeviceIntPtr p = dmxLocal->pDevice;<br>
> > int valuators[3];<br>
> > - InternalEvent* events;<br>
> > int detail = 0; /* XXX should this be mask of pressed buttons? */<br>
> > ValuatorMask mask;<br>
> > valuators[0] = x;<br>
> > valuators[1] = y;<br>
> ><br>
> > valuator_mask_set_range(&mask, 0, 2, valuators);<br>
> > - GetEventList(&events);<br>
> > - QueuePointerEvents(events, p, MotionNotify, detail,<br>
> > + QueuePointerEvents(p, MotionNotify, detail,<br>
> > POINTER_ABSOLUTE | POINTER_SCREEN, &mask);<br>
> > return;<br>
> > }<br>
> > @@ -290,7 +288,6 @@ static void dmxExtMotion(DMXLocalInputInfoPtr dmxLocal,<br>
> > int thisX = 0;<br>
> > int thisY = 0;<br>
> > int count;<br>
> > - InternalEvent* events;<br>
> > ValuatorMask mask;<br>
> ><br>
> > memset(xE, 0, sizeof(xE));<br>
> > @@ -372,8 +369,7 @@ static void dmxExtMotion(DMXLocalInputInfoPtr dmxLocal,<br>
> > if (block)<br>
> > dmxSigioBlock();<br>
> > valuator_mask_set_range(&mask, firstAxis, axesCount, v);<br>
> > - GetEventList(&events);<br>
> > - QueuePointerEvents(events, pDevice, MotionNotify, 0,<br>
> > + QueuePointerEvents(pDevice, MotionNotify, 0,<br>
> > POINTER_ABSOLUTE, &mask);<br>
> ><br>
> > if (block)<br>
> > @@ -389,7 +385,6 @@ static int dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal,<br>
> > XDeviceMotionEvent *me = (XDeviceMotionEvent *)e;<br>
> > DeviceIntPtr pDevice = dmxLocal->pDevice;<br>
> > int valuators[MAX_VALUATORS];<br>
> > - InternalEvent* events;<br>
> > ValuatorMask mask;<br>
> ><br>
> > if (!e)<br>
> > @@ -446,8 +441,7 @@ static int dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal,<br>
> > valuator_mask_set_range(&mask, ke->first_axis, ke->axes_count, valuators);<br>
> > if (block)<br>
> > dmxSigioBlock();<br>
> > - GetEventList(&events);<br>
> > - QueueKeyboardEvents(events, pDevice, event, ke->keycode, &mask);<br>
> > + QueueKeyboardEvents(pDevice, event, ke->keycode, &mask);<br>
> > if (block)<br>
> > dmxSigioUnblock();<br>
> > break;<br>
> > @@ -457,8 +451,7 @@ static int dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal,<br>
> > valuator_mask_set_range(&mask, ke->first_axis, ke->axes_count, valuators);<br>
> > if (block)<br>
> > dmxSigioBlock();<br>
> > - GetEventList(&events);<br>
> > - QueuePointerEvents(events, pDevice, event, ke->keycode,<br>
> > + QueuePointerEvents(pDevice, event, ke->keycode,<br>
> > POINTER_ABSOLUTE, &mask);<br>
> > if (block)<br>
> > dmxSigioUnblock();<br>
> > @@ -469,8 +462,7 @@ static int dmxTranslateAndEnqueueExtEvent(DMXLocalInputInfoPtr dmxLocal,<br>
> > valuator_mask_set_range(&mask, ke->first_axis, ke->axes_count, valuators);<br>
> > if (block)<br>
> > dmxSigioBlock();<br>
> > - GetEventList(&events);<br>
> > - QueueProximityEvents(events, pDevice, event, &mask);<br>
> > + QueueProximityEvents(pDevice, event, &mask);<br>
> > if (block)<br>
> > dmxSigioUnblock();<br>
> > break;<br>
> > @@ -652,7 +644,6 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,<br>
> > xEvent xE;<br>
> > DeviceIntPtr p = dmxLocal->pDevice;<br>
> > int valuators[3];<br>
> > - InternalEvent* events;<br>
> > ValuatorMask mask;<br>
> ><br>
> > DMXDBG2("dmxEnqueue: Enqueuing type=%d detail=0x%0x\n", type, detail);<br>
> > @@ -667,27 +658,24 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,<br>
> > if (dmxLocal->sendsCore && dmxLocal != dmxLocalCoreKeyboard)<br>
> > xE.u.u.detail = dmxFixup(pDev, detail, keySym);<br>
> ><br>
> > - GetEventList(&events);<br>
> > /*ErrorF("KEY %d sym %d\n", detail, (int) keySym);*/<br>
> > - QueueKeyboardEvents(events, p, type, detail, NULL);<br>
> > + QueueKeyboardEvents(p, type, detail, NULL);<br>
> > return;<br>
> ><br>
> > case ButtonPress:<br>
> > case ButtonRelease:<br>
> > detail = dmxGetButtonMapping(dmxLocal, detail);<br>
> > valuator_mask_zero(&mask);<br>
> > - GetEventList(&events);<br>
> > - QueuePointerEvents(events, p, type, detail,<br>
> > + QueuePointerEvents(p, type, detail,<br>
> > POINTER_ABSOLUTE | POINTER_SCREEN, &mask);<br>
> > return;<br>
> ><br>
> > case MotionNotify:<br>
> > - GetEventList(&events);<br>
> > valuators[0] = e->xmotion.x;<br>
> > valuators[1] = e->xmotion.y;<br>
> > valuators[2] = e->xmotion.state; /* FIXME: WTF?? */<br>
> > valuator_mask_set_range(&mask, 0, 3, valuators);<br>
> > - QueuePointerEvents(events, p, type, detail,<br>
> > + QueuePointerEvents(p, type, detail,<br>
> > POINTER_ABSOLUTE | POINTER_SCREEN, &mask);<br>
> > return;<br>
> ><br>
> > diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c<br>
> > index 62e8f78..cdf55d7 100644<br>
> > --- a/hw/kdrive/src/kinput.c<br>
> > +++ b/hw/kdrive/src/kinput.c<br>
> > @@ -66,8 +66,6 @@ static struct KdConfigDevice *kdConfigPointers = NULL;<br>
> > static KdKeyboardDriver *kdKeyboardDrivers = NULL;<br>
> > static KdPointerDriver *kdPointerDrivers = NULL;<br>
> ><br>
> > -static InternalEvent* kdEvents = NULL;<br>
> > -<br>
> > static Bool kdInputEnabled;<br>
> > static Bool kdOffScreen;<br>
> > static unsigned long kdOffScreenTime;<br>
> > @@ -1803,8 +1801,7 @@ KdReleaseAllKeys (void)<br>
> > key++) {<br>
> > if (key_is_down(ki->dixdev, key, KEY_POSTED | KEY_PROCESSED)) {<br>
> > KdHandleKeyboardEvent(ki, KeyRelease, key);<br>
> > - GetEventList(&kdEvents);<br>
> > - QueueGetKeyboardEvents(kdEvents, ki->dixdev, KeyRelease, key, NULL);<br>
> > + QueueGetKeyboardEvents(ki->dixdev, KeyRelease, key, NULL);<br>
> > }<br>
> > }<br>
> > }<br>
> > @@ -1860,8 +1857,7 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo *ki,<br>
> > else<br>
> > type = KeyPress;<br>
> ><br>
> > - GetEventList(&kdEvents);<br>
> > - QueueKeyboardEvents(kdEvents, ki->dixdev, type, key_code, NULL);<br>
> > + QueueKeyboardEvents(ki->dixdev, type, key_code, NULL);<br>
> > }<br>
> > else {<br>
> > ErrorF("driver %s wanted to post scancode %d outside of [%d, %d]!\n",<br>
> > @@ -1969,8 +1965,7 @@ _KdEnqueuePointerEvent (KdPointerInfo *pi, int type, int x, int y, int z,<br>
> ><br>
> > valuator_mask_set_range(&mask, 0, 3, valuators);<br>
> ><br>
> > - GetEventList(&kdEvents);<br>
> > - QueuePointerEvents(kdEvents, pi->dixdev, type, b, absrel, &mask);<br>
> > + QueuePointerEvents(pi->dixdev, type, b, absrel, &mask);<br>
> > }<br>
> ><br>
> > void<br>
> > diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c<br>
> > index 6402d72..c4a4db9 100644<br>
> > --- a/hw/xfree86/common/xf86Events.c<br>
> > +++ b/hw/xfree86/common/xf86Events.c<br>
> > @@ -399,7 +399,7 @@ xf86ReleaseKeys(DeviceIntPtr pDev)<br>
> > i++) {<br>
> > if (key_is_down(pDev, i, KEY_POSTED)) {<br>
> > sigstate = xf86BlockSIGIO ();<br>
> > - QueueKeyboardEvents(xf86Events, pDev, KeyRelease, i, NULL);<br>
> > + QueueKeyboardEvents(pDev, KeyRelease, i, NULL);<br>
> > xf86UnblockSIGIO(sigstate);<br>
> > }<br>
> > }<br>
> > diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c<br>
> > index 0b36163..53f763a 100644<br>
> > --- a/hw/xfree86/common/xf86Init.c<br>
> > +++ b/hw/xfree86/common/xf86Init.c<br>
> > @@ -806,8 +806,6 @@ InitInput(int argc, char **argv)<br>
> ><br>
> > mieqInit();<br>
> ><br>
> > - GetEventList(&xf86Events);<br>
> > -<br>
> > /* Initialize all configured input devices */<br>
> > for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) {<br>
> > /* Replace obsolete keyboard driver with kbd */<br>
> > diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h<br>
> > index 015e12c..5d91ab3 100644<br>
> > --- a/hw/xfree86/common/xf86Priv.h<br>
> > +++ b/hw/xfree86/common/xf86Priv.h<br>
> > @@ -148,9 +148,6 @@ extern _X_EXPORT int xf86SetVerbosity(int verb);<br>
> > extern _X_EXPORT int xf86SetLogVerbosity(int verb);<br>
> > extern _X_EXPORT Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only );<br>
> ><br>
> > -/* xf86Xinput.c */<br>
> > -extern _X_EXPORT InternalEvent *xf86Events;<br>
> > -<br>
> > #endif /* _NO_XF86_PROTOTYPES */<br>
> ><br>
> ><br>
> > diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c<br>
> > index ed0b4c8..072c1ab 100644<br>
> > --- a/hw/xfree86/common/xf86Xinput.c<br>
> > +++ b/hw/xfree86/common/xf86Xinput.c<br>
> > @@ -99,8 +99,6 @@<br>
> > return; \<br>
> > }<br>
> ><br>
> > -InternalEvent* xf86Events = NULL;<br>
> > -<br>
> > static int<br>
> > xf86InputDevicePostInit(DeviceIntPtr dev);<br>
> ><br>
> > @@ -1050,7 +1048,7 @@ xf86PostMotionEventM(DeviceIntPtr device,<br>
> > }<br>
> > #endif<br>
> ><br>
> > - QueuePointerEvents(xf86Events, device, MotionNotify, 0, flags, mask);<br>
> > + QueuePointerEvents(device, MotionNotify, 0, flags, mask);<br>
> > }<br>
> ><br>
> > void<br>
> > @@ -1095,8 +1093,7 @@ xf86PostProximityEventM(DeviceIntPtr device,<br>
> > int is_in,<br>
> > const ValuatorMask *mask)<br>
> > {<br>
> > - QueueProximityEvents(xf86Events, device,<br>
> > - is_in ? ProximityIn : ProximityOut, mask);<br>
> > + QueueProximityEvents(device, is_in ? ProximityIn : ProximityOut, mask);<br>
> > }<br>
> ><br>
> > void<br>
> > @@ -1168,7 +1165,7 @@ xf86PostButtonEventM(DeviceIntPtr device,<br>
> > }<br>
> > #endif<br>
> ><br>
> > - QueuePointerEvents(xf86Events, device,<br>
> > + QueuePointerEvents(device,<br>
> > is_down ? ButtonPress : ButtonRelease, button,<br>
> > flags, mask);<br>
> > }<br>
> > @@ -1235,7 +1232,7 @@ xf86PostKeyEventM(DeviceIntPtr device,<br>
> > }<br>
> > #endif<br>
> ><br>
> > - QueueKeyboardEvents(xf86Events, device,<br>
> > + QueueKeyboardEvents(device,<br>
> > is_down ? KeyPress : KeyRelease,<br>
> > key_code, mask);<br>
> > }<br>
> > diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c<br>
> > index bbd70bf..619427d 100644<br>
> > --- a/hw/xnest/Events.c<br>
> > +++ b/hw/xnest/Events.c<br>
> > @@ -43,8 +43,6 @@ is" without express or implied warranty.<br>
> ><br>
> > CARD32 lastEventTime = 0;<br>
> ><br>
> > -extern InternalEvent *xnestEvents;<br>
> > -<br>
> > void<br>
> > ProcessInputEvents(void)<br>
> > {<br>
> > @@ -104,9 +102,8 @@ xnestCollectExposures(void)<br>
> > void<br>
> > xnestQueueKeyEvent(int type, unsigned int keycode)<br>
> > {<br>
> > - GetEventList(&xnestEvents);<br>
> > lastEventTime = GetTimeInMillis();<br>
> > - QueueKeyboardEvents(xnestEvents, xnestKeyboardDevice, type, keycode, NULL);<br>
> > + QueueKeyboardEvents(xnestKeyboardDevice, type, keycode, NULL);<br>
> > }<br>
> ><br>
> > void<br>
> > @@ -116,7 +113,6 @@ xnestCollectEvents(void)<br>
> > int valuators[2];<br>
> > ValuatorMask mask;<br>
> > ScreenPtr pScreen;<br>
> > - GetEventList(&xnestEvents);<br>
> ><br>
> > while (XCheckIfEvent(xnestDisplay, &X, xnestNotExposurePredicate, NULL)) {<br>
> > switch (X.type) {<br>
> > @@ -134,7 +130,7 @@ xnestCollectEvents(void)<br>
> > valuator_mask_set_range(&mask, 0, 0, NULL);<br>
> > xnestUpdateModifierState(X.xkey.state);<br>
> > lastEventTime = GetTimeInMillis();<br>
> > - QueuePointerEvents(xnestEvents, xnestPointerDevice, ButtonPress,<br>
> > + QueuePointerEvents(xnestPointerDevice, ButtonPress,<br>
> > X.xbutton.button, POINTER_RELATIVE, &mask);<br>
> > break;<br>
> ><br>
> > @@ -142,7 +138,7 @@ xnestCollectEvents(void)<br>
> > valuator_mask_set_range(&mask, 0, 0, NULL);<br>
> > xnestUpdateModifierState(X.xkey.state);<br>
> > lastEventTime = GetTimeInMillis();<br>
> > - QueuePointerEvents(xnestEvents, xnestPointerDevice, ButtonRelease,<br>
> > + QueuePointerEvents(xnestPointerDevice, ButtonRelease,<br>
> > X.xbutton.button, POINTER_RELATIVE, &mask);<br>
> > break;<br>
> ><br>
> > @@ -151,7 +147,7 @@ xnestCollectEvents(void)<br>
> > valuators[1] = X.xmotion.y;<br>
> > valuator_mask_set_range(&mask, 0, 2, valuators);<br>
> > lastEventTime = GetTimeInMillis();<br>
> > - QueuePointerEvents(xnestEvents, xnestPointerDevice, MotionNotify,<br>
> > + QueuePointerEvents(xnestPointerDevice, MotionNotify,<br>
> > 0, POINTER_ABSOLUTE, &mask);<br>
> > break;<br>
> ><br>
> > @@ -183,7 +179,7 @@ xnestCollectEvents(void)<br>
> > valuators[1] = X.xcrossing.y;<br>
> > valuator_mask_set_range(&mask, 0, 2, valuators);<br>
> > lastEventTime = GetTimeInMillis();<br>
> > - QueuePointerEvents(xnestEvents, xnestPointerDevice, MotionNotify,<br>
> > + QueuePointerEvents(xnestPointerDevice, MotionNotify,<br>
> > 0, POINTER_ABSOLUTE, &mask);<br>
> > xnestDirectInstallColormaps(pScreen);<br>
> > }<br>
> > diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c<br>
> > index f8637f2..ee74101 100644<br>
> > --- a/hw/xnest/Init.c<br>
> > +++ b/hw/xnest/Init.c<br>
> > @@ -45,8 +45,6 @@ is" without express or implied warranty.<br>
> ><br>
> > Bool xnestDoFullGeneration = True;<br>
> ><br>
> > -InternalEvent *xnestEvents = NULL;<br>
> > -<br>
> > void<br>
> > InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])<br>
> > {<br>
> > @@ -100,8 +98,6 @@ InitInput(int argc, char *argv[])<br>
> > if (rc != Success)<br>
> > FatalError("Failed to init Xnest default devices.\n");<br>
> ><br>
> > - GetEventList(&xnestEvents);<br>
> > -<br>
> > mieqInit();<br>
> ><br>
> > AddEnabledDevice(XConnectionNumber(xnestDisplay));<br>
> > diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c<br>
> > index 54bb583..8dc841a 100644<br>
> > --- a/hw/xquartz/darwinEvents.c<br>
> > +++ b/hw/xquartz/darwinEvents.c<br>
> > @@ -465,7 +465,7 @@ void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, floa<br>
> > darwinEvents_lock(); {<br>
> > ValuatorMask mask;<br>
> > valuator_mask_set_range(&mask, 0, (pDev == darwinTabletCurrent) ? 5 : 2, valuators);<br>
> > - QueuePointerEvents(darwinEvents, pDev, ev_type, ev_button,<br>
> > + QueuePointerEvents(pDev, ev_type, ev_button,<br>
> > POINTER_ABSOLUTE, &mask);<br>
> > DarwinPokeEQ();<br>
> > } darwinEvents_unlock();<br>
> > @@ -479,7 +479,7 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) {<br>
> > }<br>
> ><br>
> > darwinEvents_lock(); {<br>
> > - QueueKeyboardEvents(darwinEvents, darwinKeyboard, ev_type, keycode + MIN_KEYCODE, NULL);<br>
> > + QueueKeyboardEvents(darwinKeyboard, ev_type, keycode + MIN_KEYCODE, NULL);<br>
> > DarwinPokeEQ();<br>
> > } darwinEvents_unlock();<br>
> > }<br>
> > @@ -506,7 +506,7 @@ void DarwinSendProximityEvents(int ev_type, float pointer_x, float pointer_y) {<br>
> > darwinEvents_lock(); {<br>
> > ValuatorMask mask;<br>
> > valuator_mask_set_range(&mask, 0, 5, valuators);<br>
> > - QueueProximityEvents(darwinEvents, pDev, ev_type, &mask);<br>
> > + QueueProximityEvents(pDev, ev_type, &mask);<br>
> > DarwinPokeEQ();<br>
> > } darwinEvents_unlock();<br>
> > }<br>
> > diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c<br>
> > index 8b6be02..2fa6b3f 100644<br>
> > --- a/hw/xwin/winkeybd.c<br>
> > +++ b/hw/xwin/winkeybd.c<br>
> > @@ -483,8 +483,7 @@ winSendKeyEvent (DWORD dwKey, Bool fDown)<br>
> > /* Update the keyState map */<br>
> > g_winKeyState[dwKey] = fDown;<br>
> ><br>
> > - GetEventList(&events);<br>
> > - QueueKeyboardEvents(events, g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL);<br>
> > + QueueKeyboardEvents(g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE, NULL);<br>
> ><br>
> > winDebug("winSendKeyEvent: dwKey: %d, fDown: %d, nEvents %d\n",<br>
> > dwKey, fDown, nevents);<br>
> > diff --git a/hw/xwin/winmouse.c b/hw/xwin/winmouse.c<br>
> > index aaa4d4b..b1b0657 100644<br>
> > --- a/hw/xwin/winmouse.c<br>
> > +++ b/hw/xwin/winmouse.c<br>
> > @@ -234,15 +234,13 @@ winMouseWheel (ScreenPtr pScreen, int iDeltaZ)<br>
> > void<br>
> > winMouseButtonsSendEvent (int iEventType, int iButton)<br>
> > {<br>
> > - InternalEvent* events;<br>
> > ValuatorMask mask;<br>
> ><br>
> > if (g_winMouseButtonMap)<br>
> > iButton = g_winMouseButtonMap[iButton];<br>
> ><br>
> > valuator_mask_zero(&mask);<br>
> > - GetEventList(&events);<br>
> > - QueuePointerEvents(events, g_pwinPointer, iEventType, iButton,<br>
> > + QueuePointerEvents(g_pwinPointer, iEventType, iButton,<br>
> > POINTER_RELATIVE, &mask);<br>
> ><br>
> > #if CYGDEBUG<br>
> > @@ -365,15 +363,13 @@ void winEnqueueMotion(int x, int y)<br>
> > {<br>
> > int valuators[2];<br>
> > ValuatorMask mask;<br>
> > - InternalEvent* events;<br>
> ><br>
> > miPointerSetPosition(g_pwinPointer, POINTER_RELATIVE, &x, &y);<br>
> > valuators[0] = x;<br>
> > valuators[1] = y;<br>
> ><br>
> > valuator_mask_set_range(&mask, 0, 2, valuators);<br>
> > - GetEventList(&events);<br>
> > - QueuePointerEvents(events, g_pwinPointer, MotionNotify, 0,<br>
> > + QueuePointerEvents(g_pwinPointer, MotionNotify, 0,<br>
> > POINTER_ABSOLUTE | POINTER_SCREEN, &mask);<br>
> ><br>
> > }<br>
> > diff --git a/include/input.h b/include/input.h<br>
> > index d80b4bb..efed0b7 100644<br>
> > --- a/include/input.h<br>
> > +++ b/include/input.h<br>
> > @@ -111,7 +111,6 @@ typedef struct _ValuatorMask ValuatorMask;<br>
> ><br>
> > /* The DIX stores incoming input events in this list */<br>
> > extern InternalEvent* InputEventList;<br>
> > -extern int InputEventListLen;<br>
> ><br>
> > typedef int (*DeviceProc)(<br>
> > DeviceIntPtr /*device*/,<br>
> > @@ -423,7 +422,6 @@ extern _X_EXPORT void CloseInput(void);<br>
> ><br>
> > extern _X_EXPORT int GetMaximumEventsNum(void);<br>
> ><br>
> > -extern _X_EXPORT int GetEventList(InternalEvent** list);<br>
> > extern _X_EXPORT InternalEvent *InitEventList(int num_events);<br>
> > extern _X_EXPORT void FreeEventList(InternalEvent *list, int num_events);<br>
> ><br>
> > @@ -446,7 +444,6 @@ extern _X_EXPORT int GetPointerEvents(<br>
> > const ValuatorMask *mask);<br>
> ><br>
> > extern _X_EXPORT void QueuePointerEvents(<br>
> > - InternalEvent *events,<br>
> > DeviceIntPtr pDev,<br>
> > int type,<br>
> > int buttons,<br>
> > @@ -461,7 +458,6 @@ extern _X_EXPORT int GetKeyboardEvents(<br>
> > const ValuatorMask *mask);<br>
> ><br>
> > extern _X_EXPORT void QueueKeyboardEvents(<br>
> > - InternalEvent *events,<br>
> > DeviceIntPtr pDev,<br>
> > int type,<br>
> > int key_code,<br>
> > @@ -474,7 +470,6 @@ extern int GetProximityEvents(<br>
> > const ValuatorMask *mask);<br>
> ><br>
> > extern void QueueProximityEvents(<br>
> > - InternalEvent *events,<br>
> > DeviceIntPtr pDev,<br>
> > int type,<br>
> > const ValuatorMask *mask);<br>
> > --<br>
> > 1.7.4.2<br>
> ><br>
> > _______________________________________________<br>
> > <a href="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</a>: X.Org development<br>
> > Archives: <a href="http://lists.x.org/archives/xorg-devel">http://lists.x.org/archives/xorg-devel</a><br>
> > Info: <a href="http://lists.x.org/mailman/listinfo/xorg-devel">http://lists.x.org/mailman/listinfo/xorg-devel</a><br>
> ><br>
><br>
> _______________________________________________<br>
> <a href="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</a>: X.Org development<br>
> Archives: <a href="http://lists.x.org/archives/xorg-devel">http://lists.x.org/archives/xorg-devel</a><br>
> Info: <a href="http://lists.x.org/mailman/listinfo/xorg-devel">http://lists.x.org/mailman/listinfo/xorg-devel</a><br>
</p>