Since we depend so heavily on ordering and numbering, just give all the enum explicit number values.
Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Peter Hutterer <[email protected]> --- src/synaptics.c | 2 +- src/synapticsstr.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/synaptics.c b/src/synaptics.c index f670b5f..e863081 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -2556,7 +2556,7 @@ HandleState(InputInfoPtr pInfo, struct SynapticsHwState *hw) } /* Post events */ - if (finger > FS_UNTOUCHED) { + if (finger >= FS_TOUCHED) { if (priv->absolute_events && inside_active_area) { xf86PostMotionEvent(pInfo->dev, 1, 0, 2, hw->x, hw->y); } else if (dx || dy) { diff --git a/src/synapticsstr.h b/src/synapticsstr.h index 28bb03e..6a54455 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -51,10 +51,10 @@ typedef struct _SynapticsMoveHist unsigned long millis; } SynapticsMoveHistRec; -enum FingerState { /* Note! The order matters. Compared with < operator. */ - FS_UNTOUCHED, - FS_TOUCHED, - FS_PRESSED +enum FingerState { /* Note! The order matters. Compared with < operator. */ + FS_UNTOUCHED = 0, /* this is 0 so it's the initialized value. */ + FS_TOUCHED = 1, + FS_PRESSED = 2, }; enum MovingState { -- 1.7.5.3 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
