X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=xf86-input-mtrack.git;a=blobdiff_plain;f=src%2Fgestures.c;fp=src%2Fgestures.c;h=b49ca6ea55198c91d017025d0b332cf15f12b661;hp=22a94ac15e4271da5d57905261cda469bc3ccd3f;hb=5f452ab77f51f34395be0280c8a87233a26d8cce;hpb=481529ad21f4b8518434cca82c533277f1353352 diff --git a/src/gestures.c b/src/gestures.c index 22a94ac..b49ca6e 100644 --- a/src/gestures.c +++ b/src/gestures.c @@ -210,10 +210,12 @@ static void buttons_update(struct Gestures* gs, } if (emulate) { - int pos = -1; + int try_zone; + int pos; if (cfg->button_zones && earliest >= 0) { pos = ms->touch[earliest].x; + try_zone = 1; } if (cfg->bottom_edge_zones) { int latest_bottom = -1; @@ -227,11 +229,13 @@ static void buttons_update(struct Gestures* gs, if (latest_bottom == -1 || timercmp(&ms->touch[i].down, &ms->touch[latest_bottom].down, >)) latest_bottom = i; } - if (latest_bottom >= 0) + if (latest_bottom >= 0) { pos = ms->touch[latest_bottom].x; + try_zone = 1; + } } - if (pos >= 0) { + if (try_zone) { int zones, left, right; double width;