diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-10-31 08:58:18 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-11-11 15:50:36 +1000 |
commit | 5e9b027807cc205dc9c4efbb8360ac4b20317682 (patch) | |
tree | 700982329c85feb31fb007b5f3f25a42b9dfef9a /src/evdev.c | |
parent | 2ce305129ca94394096f4d697d51eb120de2940b (diff) |
Replace 0/1 button values with enums
BUTTON_PRESS is much harder to confuse with a button number than a simple 1.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev.c')
-rw-r--r-- | src/evdev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/evdev.c b/src/evdev.c index 13b1e10..4bb55f5 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -411,9 +411,10 @@ EvdevQueueTouchEvent(InputInfoPtr pInfo, unsigned int touch, ValuatorMask *mask, * Interface for MB emulation since these need to post immediately. */ void -EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value) +EvdevPostButtonEvent(InputInfoPtr pInfo, int button, enum ButtonAction act) { - xf86PostButtonEvent(pInfo->dev, Relative, button, value, 0, 0); + xf86PostButtonEvent(pInfo->dev, Relative, button, + (act == BUTTON_PRESS) ? 1 : 0, 0, 0); } void |