[PATCH weston 1/5] compositor: When clipping pointer motions, don't loose precision
krh at bitplanet.net
Wed May 9 18:53:15 PDT 2012
On Wed, May 9, 2012 at 9:07 PM, Daniel Stone <daniel at fooishbar.org> wrote:
> On 10 May 2012 00:12, Kristian Høgsberg <krh at bitplanet.net> wrote:
>> We just need min/max_x/y to be wl_fixed_t and then we need
>> #define WL_FIXED_MAX INT32_MAX
>> #define WL_FIXED_MIN INT32_MIN
> Err? An int32_t can never be greater than INT32_MAX nor less than
> INT32_MIN - it just overflows - so I'm not sure what this check would
> actually gain us.
The code in question determines the bounding rect for all the outputs.
min_x is initialized to INT_MAX, and if a smaller value is seen,
min_x is updated. What I was saying (tersely) was that we should just
make min_x a wl_fixed_t and initialize it to WL_FIXED_MAX (which is
More information about the wayland-devel