summaryrefslogtreecommitdiff
path: root/apps/gui/wps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r--apps/gui/wps.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index 99bc731c7d..f336f77503 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -601,13 +601,12 @@ int wps_get_touchaction(struct wps_data *data)
601 regions = regions->next; 601 regions = regions->next;
602 continue; 602 continue;
603 } 603 }
604 /* reposition the touch inside the viewport */
605 vx = x - r->wvp->vp.x;
606 vy = y - r->wvp->vp.y;
607 /* check if it's inside this viewport */ 604 /* check if it's inside this viewport */
608 if (vx >= 0 && vx < r->wvp->vp.x + r->wvp->vp.width && 605 if (viewport_point_within_vp(&(r->wvp->vp), x, y))
609 vy >= 0 && vy < r->wvp->vp.y + r->wvp->vp.height) 606 { /* reposition the touch inside the viewport since touchregions
610 { 607 * are relative to a preceding viewport */
608 vx = x - r->wvp->vp.x;
609 vy = y - r->wvp->vp.y;
611 /* now see if the point is inside this region */ 610 /* now see if the point is inside this region */
612 if (vx >= r->x && vx < r->x+r->width && 611 if (vx >= r->x && vx < r->x+r->width &&
613 vy >= r->y && vy < r->y+r->height) 612 vy >= r->y && vy < r->y+r->height)