[PATCH 7/8] dix: rename ProcessRawEvents to dix/events.c:DeliverRawEvent
Peter Hutterer
peter.hutterer at who-t.net
Sun May 29 16:50:29 PDT 2011
On Sat, May 28, 2011 at 12:03:14PM +0200, walter harms wrote:
>
>
> Am 27.05.2011 07:13, schrieb Peter Hutterer:
> > No functional changes, prep work for future changes.
> >
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> > Xi/exevents.c | 31 +------------------------------
> > dix/events.c | 29 +++++++++++++++++++++++++++++
> > include/dix.h | 5 +++++
> > 3 files changed, 35 insertions(+), 30 deletions(-)
> >
> > diff --git a/Xi/exevents.c b/Xi/exevents.c
> > index 042ea69..3e3c67b 100644
> > --- a/Xi/exevents.c
> > +++ b/Xi/exevents.c
> > @@ -876,35 +876,6 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event)
> > return DEFAULT;
> > }
> >
> > -static void
> > -ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
> > -{
> > - GrabPtr grab = device->deviceGrab.grab;
> > -
> > - if (grab)
> > - DeliverGrabbedEvent((InternalEvent*)ev, device, FALSE);
> > - else { /* deliver to all root windows */
> > - xEvent *xi;
> > - int i;
> > - int filter;
> > -
> > - i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi);
> > - if (i != Success)
> > - {
> > - ErrorF("[Xi] %s: XI2 conversion failed in %s (%d)\n",
> > - __func__, device->name, i);
> > - return;
> > - }
> > -
>
> to improve readability for me it would be better to use (rc|ret|...) instead of i
>
> int rc;
> rc = EventToXI2((InternalEvent*)ev, (xEvent**)&xi);
> if (rc != Success)
> {
> ErrorF("[Xi] %s: XI2 conversion failed in %s (%d)\n",
> __func__, device->name, rc);
> return;
> }
follow-up patch, I'd rather not mix moving code with fixing code. patch
coming up in a tick.
> /* btw;
> does EventToXI2() has any useful return code ?
> if not it may be better to omit rc at all
Yes, it returns error codes. BadAlloc, BadMatch, etc.
Cheers,
Peter
More information about the xorg-devel
mailing list