From f8f6d88082766d060d30db57962f9a6d7d338c52 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sat, 16 Oct 2010 16:26:20 +0200 Subject: Adjust thumb detection based on kernel touch width alignment Recently, a set of kernel drivers were updated to align the reported touch size with actual physical size. Consequently, the thumb detection, which contains an absolute size component, needs to be updated. Remedied with this patch. Signed-off-by: Henrik Rydberg --- src/mtstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mtstate.c b/src/mtstate.c index 4c893a2..313550b 100644 --- a/src/mtstate.c +++ b/src/mtstate.c @@ -25,9 +25,9 @@ #define TOUCH_SCALE(caps) (0.05 * caps->abs[MTDEV_TOUCH_MAJOR].maximum) #define THUMB_TOUCH(hw) (1.2 * hw->touch_minor) -#define THUMB_WIDTH_TOUCH(hw) (3 * hw->touch_major) +#define THUMB_WIDTH_TOUCH(hw) (4 * hw->touch_major) #define THUMB_WIDTH_WIDTH(hw) (1.2 * hw->width_minor) -#define THUMB_WIDTH_SIZE(hw, caps) (0.15 * get_cap_xsize(caps)) +#define THUMB_WIDTH_SIZE(hw, caps) (0.25 * get_cap_xsize(caps)) void init_mtstate(struct MTState *s) { -- cgit v1.2.3