From: hrdl Date: Tue, 7 Feb 2023 10:19:35 +0000 (+0100) Subject: evdev-tablet: clip touch arbitration rectangle X-Git-Tag: 1.23.0~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e64d52fe92a5fd28d601bf8e19b7da8365ac04b;p=platform%2Fupstream%2Flibinput.git evdev-tablet: clip touch arbitration rectangle Previously the arbitration rectangle would be moved to lie completely in the first quadrant of the coordinate system. Signed-off-by: hrdl <51402-hrdl@users.noreply.gitlab.freedesktop.org> --- diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 6ce21d07..9367d860 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -1506,7 +1506,7 @@ tablet_calculate_arbitration_rect(struct tablet_dispatch *tablet) * If the stylus is tilted left (tip further right than the eraser * end) assume left-handed mode. * - * Obviously if we'd run out of the boundaries, we rescale the rect + * Obviously if we'd run out of the boundaries, we clip the rect * accordingly. */ if (tablet->axes.tilt.x > 0) { @@ -1519,14 +1519,14 @@ tablet_calculate_arbitration_rect(struct tablet_dispatch *tablet) } if (r.x < 0) { - r.w -= r.x; + r.w += r.x; r.x = 0; } r.y = mm.y - 100; r.h = 250; if (r.y < 0) { - r.h -= r.y; + r.h += r.y; r.y = 0; }