[PATCH] Re-enable the RECORD extension. (#20500)

Peter Hutterer peter.hutterer at who-t.net
Sun Jan 10 22:13:25 PST 2010


On Sat, Jan 09, 2010 at 03:45:08AM +1100, Daniel Stone wrote:
> Hi,
> 
> On Fri, Jan 08, 2010 at 03:27:27PM +1000, Peter Hutterer wrote:
> > I'd like to get more testing and review for this since it might become a
> > candidate for 1.7.5. First tests look like it works fine again.
> > This patch requires the EventToCore patch
> > http://lists.freedesktop.org/archives/xorg-devel/2010-January/004752.html
> 
> Comments inline.
> 
> > +        eventinfo.events = (xEventPtr)xi_events;
> > +        eventinfo.count = count;
> > +        ErrorF("POE xi root is %lx\n", xi_events->u.keyButtonPointer.root);
> > +        CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
> > +        xfree(xi_events);
> > +
> > +        if (IsMaster(device))
> > +        {
> > +            xEvent core;
> > +            EventToCore(ev, &core);
> > +            eventinfo.events = (xEventPtr)&core;
> > +            eventinfo.count = 1;
> > +            ErrorF("POE core root is %lx\n", core.u.keyButtonPointer.root);
> > +            CallCallbacks(&DeviceEventCallback, (pointer) & eventinfo);
> > +        }
> 
> So it looks like we will record one Xi and one core event for every
> event that ends up getting sent through the MD, regardless of which
> deliveries were made.
> 
> Previously we'd only record an input event if any deliveries of that
> type occurred, right? It looks like something like the attached
> (note: wholly untested, had to peg my CPU at 12% to prevent thermal
> shutdowns ... MacBook Air + Australian summer is a poor combination)
> would match the old semantics.

Not quite. RECORD differs between "device events" and "delivered events".
The former include all events regardless of whether they are delivered so
the process here is correct. The naming in the code is somewhat unfortunate,
it's "device events" and "events" when they are really "all events" and
"delivered events".

Record requires that _any_ event is delivered, hence the hook in
WriteEventsToClient which is called for all events including randr, XI, etc.

It looks like Chris' original patch was correct anyway once the EventToCore
patch is applied. I'm still waiting for more test feedback.

Cheers,
  Peter



More information about the xorg-devel mailing list