[PATCH] shape: Report empty region correctly
Adam Jackson
ajax at nwnk.net
Fri Jan 6 11:20:24 PST 2012
On 11/18/10 7:42 AM, Pauli wrote:
> From: Pauli Nieminen<ext-pauli.nieminen at nokia.com>
>
> If client calls XShapeGetRectangles when region is empty return values
> is NULL instead of empty rectangle.
>
> Steps to reproduce problem:
> XShapeCombineRectangles(ShapeSet with rectangle that has zero width or height)
> XShapeGetRectangles() // returns NULL
>
> Documentation claims:
> "If the extension is not supported, XShapeGetRectangles returns NULL.
> Otherwise, it returns a list of rectangles that describe the region
> specified by kind." [1]
>
> [1] http://www.x.org/releases/X11R7.6-RC1/doc/libXext/shapelib.html
>
> To fix the problem XShapeGetRectangles has to check if there is no
> rectangles in region and return sane values instead of no rectangles.
Reviewed-by: Adam Jackson <ajax at redhat.com>
I've merged this into my 1.12 queue, which I'll be sending a pull
request for shortly.
- ajax
More information about the xorg-devel
mailing list