From dad6251572071089c680932f86ff62a703054202 Mon Sep 17 00:00:00 2001 From: Luca Carlon Date: Tue, 8 Mar 2022 13:05:15 +0100 Subject: [PATCH] Use a constant id to let the user reset the input transformation matrix. Signed-off-by: Luca Carlon --- man/xinput.man | 1 + src/transform.c | 8 ++++++++ src/xinput.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/man/xinput.man b/man/xinput.man index a9b2148..922a044 100644 --- a/man/xinput.man +++ b/man/xinput.man @@ -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 diff --git a/src/transform.c b/src/transform.c index d85b071..e7c93a2 100644 --- a/src/transform.c +++ b/src/transform.c @@ -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) { diff --git a/src/xinput.c b/src/xinput.c index 7b27ffe..f1edaa7 100644 --- a/src/xinput.c +++ b/src/xinput.c @@ -105,7 +105,7 @@ static entry drivers[] = test_xi2, }, { "map-to-output", - " ", + " |all", map_to_output, }, #endif -- 2.56.0