chiark / gitweb /
Offsets: Use ymin value for bottom edge features
[xf86-input-mtrack.git] / src / mtstate.c
index bd9a7e38d91e26899184a84d426f8095f07f6b77..af476efcbe71c222236ce7c49b6e53664a0762ca 100644 (file)
@@ -237,7 +237,7 @@ static void touches_update(struct MTState* ms,
                        else
                                CLEARBIT(ms->touch[n].state, MT_PALM);
                        
-                       if (ms->touch[n].y > (100 - cfg->bottom_edge)*cfg->pad_height/100) {
+                       if ((ms->touch[n].y - get_cap_ymin(caps)) > (100 - cfg->bottom_edge)*cfg->pad_height/100) {
                                if (GETBIT(ms->touch[n].state, MT_NEW))
                                        SETBIT(ms->touch[n].state, MT_BOTTOM_EDGE);
                        }