[PATCH 3/3] dix: ddx: Lift input handling duties from xf86 to dix

Fernando Carrijo fcarrijo.lists at gmail.com
Wed Sep 8 00:06:15 PDT 2010


Peter Hutterer <peter.hutterer at who-t.net> wrote:

> On Tue, Aug 31, 2010 at 04:00:14PM -0300, Fernando Carrijo wrote:
> > 
> > Signed-off-by: Fernando Carrijo <fcarrijo at freedesktop.org>
> > Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> > ---
> >  dix/inputhandler.c             |  109 ++++++++++++++++++++++++++++++++++--
> >  hw/xfree86/common/xf86Events.c |  122 +++-------------------------------------
> >  2 files changed, 112 insertions(+), 119 deletions(-)
> > 

[...]

> >  int
> >  RemoveInputHandler(pointer handler)
> >  {
> > -    return 0;
> > +    IHPtr ih;
> > +    int fd;
> > +
> > +    if (!handler)
> > +	return -1;
> > +
> > +    ih = handler;
> 
> If we're assuming the handler is an IHPtr, why make it a pointer?
> same goes for all others, we might as well have the compiler help us here.
> this should probably be a follow-up patch though.

I kept the parameter type as pointer uniquely to minimize the number of changes
in this patch, but I do agree with you that these circumstances call for richer
semantics. The patch with the correction will follow the second version of this
series.

Thanks for reviewing, Peter.


More information about the xorg-devel mailing list