[PATCH 19/42] dix: generate touchpoints from driver-submitted data
Chase Douglas
chase.douglas at canonical.com
Mon Dec 19 18:05:48 PST 2011
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.
> + {
> + 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.
-- Chase
More information about the xorg-devel
mailing list