[PATCH 2/2] evdev: Post the valuators with ButtonPress/Release events.
oliver.mcfadden at nokia.com
oliver.mcfadden at nokia.com
Thu Jul 23 05:09:11 PDT 2009
From: Oliver McFadden <oliver.mcfadden at nokia.com>
Requires my previous patch to the X server which adds the
xf86PostButtonEventP function.
---
src/evdev.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/evdev.c b/src/evdev.c
index 266209a..932e338 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -669,20 +669,20 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
int v[MAX_VALUATORS])
{
int i;
+ int key, val;
EvdevPtr pEvdev = pInfo->private;
for (i = 0; i < pEvdev->num_queue; i++) {
+ key = pEvdev->queue[i].key;
+ val = pEvdev->queue[i].val;
+
switch (pEvdev->queue[i].type) {
case EV_QUEUE_KEY:
- xf86PostKeyboardEvent(pInfo->dev, pEvdev->queue[i].key,
- pEvdev->queue[i].val);
+ xf86PostKeyboardEvent(pInfo->dev, key, 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);
+ xf86PostButtonEventP(pInfo->dev, !pEvdev->rel, key, val,
+ *first_v, *num_v, v);
break;
}
}
--
1.6.1
More information about the xorg-devel
mailing list