diff options
author | Luca Carlon <carlon.luca@gmail.com> | 2022-03-08 13:05:15 +0100 |
---|---|---|
committer | Luca Carlon <carlon.luca@gmail.com> | 2022-03-10 12:56:08 +0100 |
commit | dad6251572071089c680932f86ff62a703054202 (patch) | |
tree | 896aa6578da99fda00f2a74c2a770ddd93b36c50 | |
parent | f77ed7621e6e7918fe1eb3d390f22b545b883a33 (diff) |
Use a constant id to let the user reset the input transformation matrix.
Signed-off-by: Luca Carlon <carlon.luca@gmail.com>
-rw-r--r-- | man/xinput.man | 1 | ||||
-rw-r--r-- | src/transform.c | 8 | ||||
-rw-r--r-- | src/xinput.c | 2 |
3 files changed, 10 insertions, 1 deletions
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", - "<device> <output name>", + "<device> <output name>|all", map_to_output, }, #endif |