David Ung <[email protected]> writes:

>>> RRPointerToNearestCrtc is suppose to snap to the nearest Crtc,
>>> but the code is buggy.  Correct the calculation of delta x/y
>>> values and choose the closest Crtc.
>>
>> This comment isn't terribly descriptive of the problems it's
>> solving. There are two -- one where the dx/dy values end up off-by-one
>> and another where it's simply forgetting to actually set the 'best' value.
>
> but its more that dx/dy off-by-one.
>
> previously best_dx/dy is always positive, if x > scan_width, 
> when you call SetCursorPosition, the cursor's x position is gonna be
> even further away from the crtc's right edge.

Right.

> RRPointerToNearestCrtc is suppose to snap to the nearest Crtc,
> but best_x and best_y is always positive, hence when calling 
> SetCursorPosition it will make the cursor even further away.
> Correct delta x/y to allow negative values and also use
>  "width/height -1" in the calculation.  Also choose the closest Crtc
> by setting the "best" value.

Thanks. That describes the patch better.

Reviewed-by: Keith Packard <[email protected]>

-- 
[email protected]

Attachment: pgp8fQWNSNj1u.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to