]> diplodocus.org Git - xorg-xinput/commitdiff
Use a constant id to let the user reset the input transformation matrix.
authorLuca Carlon <carlon.luca@gmail.com>
Tue, 8 Mar 2022 12:05:15 +0000 (13:05 +0100)
committerLuca Carlon <carlon.luca@gmail.com>
Thu, 10 Mar 2022 11:56:08 +0000 (12:56 +0100)
Signed-off-by: Luca Carlon <carlon.luca@gmail.com>
man/xinput.man
src/transform.c
src/xinput.c

index a9b2148..922a044 100644 (file)
@@ -149,6 +149,7 @@ Restricts the movements of the absolute \fIdevice\fP to the RandR
 detected or RandR 1.2 or later is not available, a Xinerama output may be
 specified as "HEAD-N", with N being the Xinerama screen number. This option
 has no effect on relative devices.
+If crtc is set to "all", the default behavior is applied.
 .PP
 .TP 8
 .B --enable \fIdevice\fP
index d85b071..e7c93a2 100644 (file)
@@ -331,6 +331,14 @@ map_to_output(Display *dpy, int argc, char *argv[], char *name, char *desc)
     }
 
     output_name = argv[1];
+
+    if (!strcmp("all", output_name))
+    {
+        Matrix m;
+        matrix_set_unity(&m);
+        return apply_matrix(dpy, info->deviceid, &m);
+    }
+
     output_info = find_output_xrandr(dpy, output_name);
     if (!output_info)
     {
index 7b27ffe..f1edaa7 100644 (file)
@@ -105,7 +105,7 @@ static entry drivers[] =
       test_xi2,
     },
     { "map-to-output",
-      "<device> <output name>",
+      "<device> <output name>|all",
       map_to_output,
     },
 #endif