diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-11 13:31:52 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-02-11 13:31:52 +1000 |
commit | 0049cce4d0691f055dfe9059e4c0c4ad30301db6 (patch) | |
tree | 13bc2e585af1000f163aec0423b2fdfe121a61a8 /src/evdev.c | |
parent | Add third button emulation. (diff) | |
download | xf86-input-evdev-0049cce4d0691f055dfe9059e4c0c4ad30301db6.tar.gz xf86-input-evdev-0049cce4d0691f055dfe9059e4c0c4ad30301db6.tar.bz2 xf86-input-evdev-0049cce4d0691f055dfe9059e4c0c4ad30301db6.zip |
Use Absolute/Relative as argument to xf86Post*
xf86Post* takes an int for the is_absolute parameter. Since the XI protocol
spec requires Relative to be 0 and Absolute to be 1, use those instead to
make the code easier to read.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev.c')
-rw-r--r-- | src/evdev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/evdev.c b/src/evdev.c index bb30655..519a50e 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -332,7 +332,7 @@ EvdevQueueProximityEvent(InputInfoPtr pInfo, int value) void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value) { - xf86PostButtonEvent(pInfo->dev, 0, button, value, 0, 0); + xf86PostButtonEvent(pInfo->dev, Relative, button, value, 0, 0); } void @@ -695,7 +695,7 @@ EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, EvdevPtr pEvdev = pInfo->private; if (pEvdev->rel_queued) { - xf86PostMotionEventM(pInfo->dev, FALSE, pEvdev->vals); + xf86PostMotionEventM(pInfo->dev, Relative, pEvdev->vals); } } @@ -718,7 +718,7 @@ EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int num_v, int first_v, * this scheme still just work. */ if (pEvdev->abs_queued && pEvdev->in_proximity) { - xf86PostMotionEventM(pInfo->dev, TRUE, pEvdev->vals); + xf86PostMotionEventM(pInfo->dev, Absolute, pEvdev->vals); } } @@ -765,12 +765,12 @@ static void EvdevPostQueuedEvents(InputInfoPtr pInfo, int num_v, int first_v, break; if (pEvdev->abs_queued && pEvdev->in_proximity) { - xf86PostButtonEventP(pInfo->dev, 1, pEvdev->queue[i].key, + xf86PostButtonEventP(pInfo->dev, Absolute, pEvdev->queue[i].key, pEvdev->queue[i].val, first_v, num_v, v + first_v); } else - xf86PostButtonEvent(pInfo->dev, 0, pEvdev->queue[i].key, + xf86PostButtonEvent(pInfo->dev, Relative, pEvdev->queue[i].key, pEvdev->queue[i].val, 0, 0); break; case EV_QUEUE_PROXIMITY: |