On Sun, Dec 13, 2009 at 10:57 PM, Peter Hutterer
<[email protected]>wrote:

> This check would cause setting of the property to fail since -
> especially if only one coordinate is modified - overlap was virtually
> guaranteed to happen.
>

Then,  WcmPointInArea should be changed from

    if (area->topX <= x && x <= area->bottomX &&
        area->topY <= y && y <= area->bottomY)
To

    if (area->topX < x && x < area->bottomX &&
        area->topY < y && y < area->bottomY)

Some thing else may need to be updated with this change.  But, this should
fix the overlap issue.  You can apply this change.  I will look into the
other possible changes once I get there.  Area is a low priority issue for
our current work, I think.


> Each tool only has a single area, so this check doesn't seem necessary.
>

We are not verifying the area that is associated with the tool we are
using.  We are verifying the other areas in the list.  WcmAreaListOverlap
has this line:

        if (area != list && WcmAreasOverlap(list, area))

Ping


>
> Signed-off-by: Peter Hutterer <[email protected]>
> ---
> If I understand this correctly, priv->tool->arealist is this tool's area,
> so
> the check for the area overlap is superfluous here (especially since it
> always produces overlaps).
>
>  src/wcmXCommand.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
> index 23402c3..4dd4be1 100644
> --- a/src/wcmXCommand.c
> +++ b/src/wcmXCommand.c
> @@ -317,10 +317,6 @@ int xf86WcmSetProperty(DeviceIntPtr dev, Atom
> property, XIPropertyValuePtr prop,
>         area.bottomX = values[2];
>         area.bottomY = values[3];
>
> -       /* FIXME: this will always be the case? */
> -        if (WcmAreaListOverlap(&area, priv->tool->arealist))
> -            return BadValue;
> -
>         if (!checkonly)
>         {
>             /* Invalid range resets axis to defaults */
> --
> 1.6.5.2
>
>
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to