[PATCH 19/42] dix: generate touchpoints from driver-submitted data

Peter Hutterer peter.hutterer at who-t.net
Mon Dec 19 19:07:48 PST 2011


On Mon, Dec 19, 2011 at 06:05:48PM -0800, Chase Douglas wrote:
> On Dec 14, 2011, at 7:01 PM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> 
> [snip]
> 
> > +
> > +    if (need_rawevent)
> 
> I don't see where need_rawevent could ever be false. Perhaps it will occur
> in later patches? Otherwise, the variable should be removed and
> conditional blocks unrolled.

for the archives: the DIX may call GetTouchEvents for TouchBegin and
TouchEnd events if the grab semantics require it. Those events must not
generate raw events.

> > +    {
> > +        raw = &events->raw_event;
> > +        events++;
> > +        num_events++;
> > +        init_raw(dev, raw, ms, type, ti->client_id);
> > +        set_raw_valuators(raw, &mask, raw->valuators.data_raw);
> > +    }
> > +
> > +    event = &events->device_event;
> > +    num_events++;
> > +
> > +    init_event(dev, event, ms);
> > +
> > +    switch (type) {
> > +    case XI_TouchBegin:
> > +        event->type = ET_TouchBegin;
> > +        /* If we're starting a touch, we must have x & y co-ordinates. */
> > +        if (!mask_in ||
> > +            !valuator_mask_isset(mask_in, 0) ||
> > +            !valuator_mask_isset(mask_in, 1))
> > +        {
> > +            DebugF("%s: Attempted to start touch without x/y (driver bug)\n",
> > +                   dev->name);
> 
> Imo, this should be an ErrorF. It should be obvious in the logs if you touch the screen and nothing happens.

amended locally, thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list