mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-07 06:08:08 +02:00
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>
This commit is contained in:
parent
c855012ddb
commit
1e64d52fe9
1 changed files with 3 additions and 3 deletions
|
|
@ -1506,7 +1506,7 @@ tablet_calculate_arbitration_rect(struct tablet_dispatch *tablet)
|
||||||
* If the stylus is tilted left (tip further right than the eraser
|
* If the stylus is tilted left (tip further right than the eraser
|
||||||
* end) assume left-handed mode.
|
* 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.
|
* accordingly.
|
||||||
*/
|
*/
|
||||||
if (tablet->axes.tilt.x > 0) {
|
if (tablet->axes.tilt.x > 0) {
|
||||||
|
|
@ -1519,14 +1519,14 @@ tablet_calculate_arbitration_rect(struct tablet_dispatch *tablet)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r.x < 0) {
|
if (r.x < 0) {
|
||||||
r.w -= r.x;
|
r.w += r.x;
|
||||||
r.x = 0;
|
r.x = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
r.y = mm.y - 100;
|
r.y = mm.y - 100;
|
||||||
r.h = 250;
|
r.h = 250;
|
||||||
if (r.y < 0) {
|
if (r.y < 0) {
|
||||||
r.h -= r.y;
|
r.h += r.y;
|
||||||
r.y = 0;
|
r.y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue