The pad was in relative mode because we kept submitting x/y axes along with
the other data (and x/y was always 0/0). Hence the pointer always moved to
the screen origin when the pad was used.

With the recent changes, we only submit valuators 3, 4, 5 for the pad and
can thus switch the pad to absolute mode.

Signed-off-by: Peter Hutterer <[email protected]>
---
 src/wcmConfig.c         |    2 +-
 src/wcmValidateDevice.c |    4 ++--
 src/wcmXCommand.c       |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/wcmConfig.c b/src/wcmConfig.c
index 9060724..af385f2 100644
--- a/src/wcmConfig.c
+++ b/src/wcmConfig.c
@@ -206,7 +206,7 @@ static int wcmSetType(InputInfoPtr pInfo, const char *type)
                pInfo->type_name = XI_ERASER;
        } else if (xf86NameCmp(type, "pad") == 0)
        {
-               priv->flags = PAD_ID;
+               priv->flags = ABSOLUTE_FLAG|PAD_ID;
                pInfo->type_name = XI_PAD;
        }
 
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index a22ca3c..e3ee091 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -498,7 +498,7 @@ int wcmParseOptions(InputInfoPtr pInfo, int hotplugged)
                 */
        }
 
-       /* Pad is always in relative mode.
+       /* Pad is always in absolute mode.
         * The pad also defaults to wheel scrolling, unlike the pens
         * (interesting effects happen on ArtPen and others with build-in
         * wheels)
@@ -507,7 +507,7 @@ int wcmParseOptions(InputInfoPtr pInfo, int hotplugged)
        {
                priv->wheelup = 4;
                priv->wheeldn = 5;
-               set_absolute(pInfo, FALSE);
+               set_absolute(pInfo, TRUE);
        }
 
        s = xf86SetStrOption(pInfo->options, "Rotate", NULL);
diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index 1b36280..fab5f2f 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -35,9 +35,9 @@ int wcmDevSwitchModeCall(InputInfoPtr pInfo, int mode)
 
        DBG(3, priv, "to mode=%d\n", mode);
 
-       /* Pad is always in relative mode.*/
+       /* Pad is always in absolute mode.*/
        if (IsPad(priv))
-               return (mode == Relative) ? Success : XI_BadMode;
+               return (mode == Absolute) ? Success : XI_BadMode;
 
        if ((mode == Absolute) && !is_absolute(pInfo))
                set_absolute(pInfo, TRUE);
-- 
1.7.3.3


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to