[PATCH 06/11] dix: return deliveries from DeliverGrabbedEvent

Peter Hutterer peter.hutterer at who-t.net
Wed May 11 17:38:59 PDT 2011


On Wed, May 11, 2011 at 02:15:12PM -0700, Jamey Sharp wrote:
> I guess this is harmless, but I don't see any justification. At a quick
> glance I don't see the return value being used by later patches. Perhaps
> a note in the commit message is in order?
 
added. It's a leftover patch from a dead end I coded myself into but as you
said it's harmless enough. I originally used this value for raw event
delivery but that approach needed a major rewrite of other bits so I gave up
on that approach.

Amended to state that no-one actually uses this right now.

Cheers,
  Peter

> On Wed, May 11, 2011 at 02:49:45PM +1000, Peter Hutterer wrote:
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> >  dix/events.c  |    6 +++++-
> >  include/dix.h |    2 +-
> >  2 files changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/dix/events.c b/dix/events.c
> > index a8bfa72..4721f40 100644
> > --- a/dix/events.c
> > +++ b/dix/events.c
> > @@ -3896,8 +3896,10 @@ unwind:
> >   * grab. If not, TryClientEvents() is used.
> >   *
> >   * @param deactivateGrab True if the device's grab should be deactivated.
> > + *
> > + * @return The number of events delivered.
> >   */
> > -void
> > +int
> >  DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
> >                      Bool deactivateGrab)
> >  {
> > @@ -4065,6 +4067,8 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
> >      free(core);
> >      free(xi);
> >      free(xi2);
> > +
> > +    return deliveries;
> >  }
> >  
> >  /* This function is used to set the key pressed or key released state -
> > diff --git a/include/dix.h b/include/dix.h
> > index fb9be43..9a111e8 100644
> > --- a/include/dix.h
> > +++ b/include/dix.h
> > @@ -415,7 +415,7 @@ extern void DeliverFocusedEvent(
> >      InternalEvent* /* event */,
> >      WindowPtr /* window */);
> >  
> > -extern void DeliverGrabbedEvent(
> > +extern int DeliverGrabbedEvent(
> >      InternalEvent* /* event */,
> >      DeviceIntPtr /* thisDev */,
> >      Bool /* deactivateGrab */);
> > -- 
> > 1.7.4.4
> > 
> > _______________________________________________
> > 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




More information about the xorg-devel mailing list