]> git.mdlowis.com Git - proto/labwc.git/commitdiff
input: apply tablet rotation before area transformation
authorJens Peters <jp7677@gmail.com>
Thu, 8 Aug 2024 18:01:37 +0000 (20:01 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 8 Aug 2024 19:27:06 +0000 (20:27 +0100)
This makes the behavior consistent with auto-rotation
as a result of output mapping.

docs/labwc-config.5.scd
src/input/tablet.c

index c526f8cd60fbd94e8309989e6c42d198884ed025..bd03fd6bf4f447724f4c615a914c7a02febd8b66 100644 (file)
@@ -696,7 +696,7 @@ extending outward from the snapped edge.
 
 *<tablet rotate="" />* [0|90|180|270]
        The tablet orientation can be changed in 90 degree steps. Default is
-       no rotation (0). Rotation will be applied after applying tablet area
+       no rotation (0). Rotation will be applied before applying tablet area
        transformation.
 
        See also *calibrationMatrix* in libinput section below for advanced
index 341d45ace22ddb6195b036bc9632aa08049c2c75..1d280e717b0aa203527f411a858b272da7daac54 100644 (file)
@@ -125,9 +125,9 @@ tablet_get_coords(struct drawing_tablet *tablet, double *x, double *y, double *d
        *y = tablet->y;
        *dx = tablet->dx;
        *dy = tablet->dy;
+       adjust_for_rotation(rc.tablet.rotation, x, y);
        adjust_for_tablet_area(tablet->tablet->width_mm, tablet->tablet->height_mm,
                rc.tablet.box, x, y);
-       adjust_for_rotation(rc.tablet.rotation, x, y);
        adjust_for_rotation_relative(rc.tablet.rotation, dx, dy);
        adjust_for_motion_sensitivity(rc.tablet_tool.relative_motion_sensitivity, dx, dy);