<#part sign=pgpmime>
On Wed, 8 Feb 2012 19:18:19 +1000, Peter Hutterer <[email protected]>
wrote:
> - /* FIXME: check request length, 12 for XI 2.0+, 20 for XI 2.2+ */
> + xi_client = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
> + if (!xi_client)
> + return BadRequest;
Other uses of this private do not check for a NULL return as it "can't"
happen.
> +
> + if (version_compare(xi_client->major_version,
> + xi_client->minor_version, 2, 2) >= 0)
> + {
> + REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq);
> + have_xi22 = TRUE;
> + } else
> + REQUEST_SIZE_MATCH(xXIAllowEventsReq);
I'd enclose the else clause in { } as REQUEST_SIZE_MATCH contains an
'if' clause. Fortunately, it doesn't cause any harm in this case, but...
> + rc = dixLookupWindow(&win, stuff->grab_window, client,
> DixReadAccess);
> + if (rc != Success)
> + return rc;
> +
> + ret = TouchAcceptReject(client, dev, stuff->mode, stuff->touchid,
> + stuff->grab_window, &client->errorValue);
> + }
Why does this look the window up and then pass the window ID along to
TouchAcceptReject? Seems like a funky API to me.
--
[email protected]
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel