[PATCH] randr: Fix logic in RRPointerToNearestCrtc
keithp at keithp.com
Mon Jul 28 12:14:21 PDT 2014
David Ung <davidu at nvidia.com> writes:
> From: David Ung [davidu at nvidia.com]
> Sent: Thursday, July 17, 2014 5:19 PM
> To: xorg-devel at lists.x.org
> Cc: David Ung
> Subject: [PATCH] randr: Fix logic in RRPointerToNearestCrtc
> 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.
> + dist = abs(dx) + abs(dy);
You don't need abs here; dx and dy are always positive.
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 810 bytes
Desc: not available
More information about the xorg-devel