In almost all cases, a user that needs to set the are will need to set all
4 values. Instead of asking the user to type 4 commands to set the area,
just provide one parameter that takes 4 coordinates.

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 man/xsetwacom.man |    7 +++++++
 tools/xsetwacom.c |   26 +++-----------------------
 2 files changed, 10 insertions(+), 23 deletions(-)

diff --git a/man/xsetwacom.man b/man/xsetwacom.man
index 76c404e..1194b58 100644
--- a/man/xsetwacom.man
+++ b/man/xsetwacom.man
@@ -85,6 +85,13 @@ when trying to be modified.
 
 .SH "PARAMETERS"
 .TP
+\fBArea\fR x1 y1 x2 y2
+Specify the tablet input area in device coordinates in the form top left
+x/y and bottom right x/y. Top left and bottom right are defined in the
+device's native orientation, regardless of the actual rotation currently
+applied. Input outside of these coordinates will be clipped
+to the edges of the area defined.
+.TP
 \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
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index 40180e0..e23e4a2 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -111,32 +111,12 @@ static void set_output(Display *dpy, XDevice *dev, 
param_t *param, int argc, cha
 static param_t parameters[] =
 {
        {
-               .name = "TopX",
-               .desc = "Bounding rect left coordinate in tablet units. ",
+               .name = "Area",
+               .desc = "Valid tablet area in device coordinates.",
                .prop_name = WACOM_PROP_TABLET_AREA,
                .prop_format = 32,
                .prop_offset = 0,
-       },
-       {
-               .name = "TopY",
-               .desc = "Bounding rect top coordinate in tablet units . ",
-               .prop_name = WACOM_PROP_TABLET_AREA,
-               .prop_format = 32,
-               .prop_offset = 1,
-       },
-       {
-               .name = "BottomX",
-               .desc = "Bounding rect right coordinate in tablet units. ",
-               .prop_name = WACOM_PROP_TABLET_AREA,
-               .prop_format = 32,
-               .prop_offset = 2,
-       },
-       {
-               .name = "BottomY",
-               .desc = "Bounding rect bottom coordinate in tablet units. ",
-               .prop_name = WACOM_PROP_TABLET_AREA,
-               .prop_format = 32,
-               .prop_offset = 3,
+               .prop_extra = 3
        },
        {
                .name = "Button1",
-- 
1.7.3.5


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to