[UPDATED PATCH weston 1/2] shell: Implement the probe_area request on the shell surface
Bill Spitzak
spitzak at gmail.com
Thu Apr 25 13:06:13 PDT 2013
Pekka Paalanen wrote:
> If you wanted this to work also on transformed surfaces, I think you
> would need to transform all four corners, and then operate on the
> bounding box. When returning the result, account for the boundingbox's
> effect on the coordinates.
I do not believe that will result in any good behavior. It will clip to
a much-too-small box.
Technically the only correct solution is to return a region (not a
rectangle) describing what will be visible. However that is rather a
pain for clients to deal with.
I recommend that the rectangle be transformed to a approximation with
the correct area in the global coordinates, clipped, and that clip
transformed back as an approximation. This has worked extremely well for
some drawing code we are using, though the objects are rounded
rectangles. I posted how to do this transform in a previous email.
More information about the wayland-devel
mailing list