If zero commandline arguments are provided to 'set_output', we
now interpret that as the user's desire to remap their tablet to the
entire desktop. This is accomplished by loading the identity matrix.
---
man/xsetwacom.man | 5 +++--
tools/xsetwacom.c | 12 ++++++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/man/xsetwacom.man b/man/xsetwacom.man
index 948f2e9..539f405 100644
--- a/man/xsetwacom.man
+++ b/man/xsetwacom.man
@@ -119,10 +119,11 @@ the device will ignore events from other tools. A serial
of 0 means the
device is unbound and will react to any tool of the matching type.
Default: 0
.TP
-\fBMapToOutput\fR output
+\fBMapToOutput\fR [output]
Map the tablet's input area to the given output (e.g. "VGA1"). The output
must specify one of those available through the XRandR extension. A list of
-outputs may be obtained with the xrandr tool. The output mapping
+outputs may be obtained with the xrandr tool. If no output is provided,
+the tablet is mapped to the entire desktop. The output mapping
configuration is a onetime setting and does not track output
reconfigurations; the command needs to be re-run whenever the output
configuration changes. When used with tablet rotation, the tablet must be
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index 365bad4..5527a77 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -2103,9 +2103,17 @@ static void set_output(Display *dpy, XDevice *dev,
param_t *param, int argc, cha
int opcode, event, error;
int maj, min;
- if (argc != param->arg_count)
+ if (argc == 0)
{
- fprintf(stderr, "'%s' requires exactly %d value(s).\n",
param->name,
+ float matrix[9] = { 1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1};
+ _set_matrix_prop(dpy, dev, matrix);
+ return;
+ }
+ else if (argc != param->arg_count)
+ {
+ fprintf(stderr, "'%s' requires exactly 0 or %d value(s).\n",
param->name,
param->arg_count);
return;
}
--
1.7.5.2
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel