From 5e9b027807cc205dc9c4efbb8360ac4b20317682 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 31 Oct 2011 08:58:18 +1000 Subject: 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 --- src/evdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/evdev.c') 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 -- cgit v1.2.3