[PATCH 4/4] input: remove DDX event list handling

zt.tmzt at gmail.com zt.tmzt at gmail.com
Thu Apr 14 20:46:06 PDT 2011


On Apr 14, 2011 11:32 PM, "Jeremy Huddleston" <jeremyhu at apple.com> wrote:
>
> 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!

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


More information about the xorg-devel mailing list