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 bd9a7e38d91e26899184a84d426f8095f07f6b77..af476efcbe71c222236ce7c49b6e53664a0762ca 100644 (file)
@@ -237,7 +237,7 @@ static void touches_update(struct MTState* ms,
                        else
                                CLEARBIT(ms->touch[n].state, MT_PALM);
                        
                        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);
                        }
                                if (GETBIT(ms->touch[n].state, MT_NEW))
                                        SETBIT(ms->touch[n].state, MT_BOTTOM_EDGE);
                        }