On Mon, 2018-04-02 at 16:41 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.veli...@collabora.com>
> Currently depending on the code path hit, the helper will set some of
> the output values and not others.
> It could also leak memory ;-)
> At the same time the caller was:
>  - working around the broken behaviour - by initialising the variables
>  - outright ignoring if the helper fails
> Fix all that by consistently setting the output variables and returning
> a protocol error if we fail to get the data required.
> Bonus points: current code does not attribute if we cannot get the
> modifiers info for certain format. A smaller format array is available,
> yet the original length is stored.
> Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers")
> Cc: Louis-Francis Ratté-Boulianne <l...@collabora.com>
> Cc: Daniel Stone <dani...@collabora.com>
> Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
> ---
> We could still return "success" to the user - I've opted for this
> solution since we already bail on dixLookupWindow failure.

This, combined with 10/15, means you will now throw BadImplementation
when we used to succeed and simply report no modifiers. I can't think
of a good reason to make that an error, it just makes the client's life
harder if it has to distinguish error from reply.

- ajax
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to