chiark / gitweb /
Offsets: Use ymin value for bottom edge features
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 23 Apr 2016 22:20:29 +0000 (23:20 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 26 Apr 2016 19:42:32 +0000 (20:42 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/mtstate.c

index bd9a7e3..af476ef 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);
                        }