aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-09-08 11:30:14 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-10-11 08:47:47 +1000
commit7282e3ac6c3b23cce927271fb9ca34b2acd36fd3 (patch)
tree39dee3dbcd812cb3caae637746646e433a719b1a
parentFix valuator offset when posting absolute motion events. (diff)
downloadxf86-input-evdev-7282e3ac6c3b23cce927271fb9ca34b2acd36fd3.tar.gz
xf86-input-evdev-7282e3ac6c3b23cce927271fb9ca34b2acd36fd3.tar.bz2
xf86-input-evdev-7282e3ac6c3b23cce927271fb9ca34b2acd36fd3.zip
When posting buttons, post absolute valuators if we have them.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
-rw-r--r--src/evdev.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 1775ad9..1720f96 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -661,11 +661,16 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v,
pEvdev->queue[i].val);
break;
case EV_QUEUE_BTN:
- /* FIXME: Add xf86PostButtonEventP to the X server so that we may
- * pass the valuators on ButtonPress/Release events, too. Currently
- * only MotionNotify events contain the pointer position. */
- xf86PostButtonEvent(pInfo->dev, 0, pEvdev->queue[i].key,
- pEvdev->queue[i].val, 0, 0);
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
+ if (pEvdev->abs && pEvdev->tool) {
+ xf86PostButtonEventP(pInfo->dev, 1, pEvdev->queue[i].key,
+ pEvdev->queue[i].val, first_v, num_v,
+ v + first_v);
+
+ } else
+#endif
+ xf86PostButtonEvent(pInfo->dev, 0, pEvdev->queue[i].key,
+ pEvdev->queue[i].val, 0, 0);
break;
}
}