Instead of allowing zero arguments to map the tablet to the entire
desktop, we require the use of the keyword "desktop" to accomplish
this. This is to make it easier to figure out the user's intent
later on when we introduce KeepShape.

Signed-off-by: Jason Gerecke <[email protected]>
---
 Changes from v2:
  * Corresponds to patch v2 7/9

  * 'set_output_desktop' already introduced in prior patch

  * Require the use of the keyword "desktop" instead of allowing
    an empty string

 tools/xsetwacom.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index 298da44..dbef4e3 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -2273,17 +2273,9 @@ static void set_output(Display *dpy, XDevice *dev, 
param_t *param, int argc, cha
        int tmp_int[2];
        unsigned int tmp_uint[2];
 
-       if (argc == 0)
+       if (argc != param->arg_count)
        {
-               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,
+               fprintf(stderr, "'%s' requires exactly %d value(s).\n", 
param->name,
                        param->arg_count);
                return;
        }
@@ -2297,6 +2289,10 @@ static void set_output(Display *dpy, XDevice *dev, 
param_t *param, int argc, cha
        {
                set_output_next(dpy, dev);
        }
+       else if (strcasecmp(argv[0], "desktop") == 0)
+       {
+               set_output_desktop(dpy, dev);
+       }
        else if (!need_xinerama(dpy))
        {
                set_output_xrandr(dpy, dev, argv[0]);
-- 
1.7.6


------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to