aboutsummaryrefslogtreecommitdiff
path: root/src/emuThird.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-02-11 13:31:52 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-02-11 13:31:52 +1000
commit0049cce4d0691f055dfe9059e4c0c4ad30301db6 (patch)
tree13bc2e585af1000f163aec0423b2fdfe121a61a8 /src/emuThird.c
parentAdd third button emulation. (diff)
downloadxf86-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/emuThird.c')
-rw-r--r--src/emuThird.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emuThird.c b/src/emuThird.c
index bdf133a..a65c24e 100644
--- a/src/emuThird.c
+++ b/src/emuThird.c
@@ -62,7 +62,7 @@ Evdev3BEmuPostButtonEvent(InputInfoPtr pInfo, int button, int press)
{
EvdevPtr pEvdev = pInfo->private;
struct emulate3B *emu3B = &pEvdev->emulate3B;
- int absolute = 0;
+ int absolute = Relative;
/* if we cancel, emit the button down event at our start position,
* not at the current position. Only for absolute devices though. For
@@ -70,7 +70,7 @@ Evdev3BEmuPostButtonEvent(InputInfoPtr pInfo, int button, int press)
* us back more than we moved and confuse the user.
*/
if (emu3B->flags & EVDEV_ABSOLUTE_EVENTS)
- absolute = 1;
+ absolute = Absolute;
xf86PostButtonEventP(pInfo->dev, absolute, button, press, 0,
(absolute ? 2 : 0), emu3B->startpos);