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