On 03/29/2012 01:27 AM, Daniel Kurtz wrote:
> Events from button-only devices still need coordinates, and they get them
> from scale_to_desktop().  This isn't a bug, so don't BUG_WARN(), which
> just fills up the log with Backtraces...
> 
> This was noticed when unplugging a "Creative Technology SB Arena Headset",
> which emits [BTN_3] = 0 on unplug.
> 
> Signed-off-by: Daniel Kurtz <[email protected]>
> ---
>  dix/getevents.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/getevents.c b/dix/getevents.c
> index 3093786..ca9427c 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -848,7 +848,6 @@ scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask,
>      ScreenPtr scr = miPointerGetScreen(dev);
>      double x, y;
>  
> -    BUG_WARN(!dev->valuator || dev->valuator->numAxes < 2);

I assume this device does not have any valuators. We still want to
BUG_WARN when there are valuators but the number of axes is less than
two, right? So we should replace this with:

BUG_WARN(dev->valuator && dev->valuator->numAxes < 2);

-- Chase
_______________________________________________
[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