[PATCH] dix: don't BUG_WARN for button events from button-only device

Daniel Kurtz djkurtz at chromium.org
Thu Mar 29 01:27:51 PDT 2012


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 <djkurtz at chromium.org>
---
 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);
     if (!dev->valuator || dev->valuator->numAxes < 2) {
         /* if we have no axes, last.valuators must be in screen coords
          * anyway */
-- 
1.7.7.3



More information about the xorg-devel mailing list