INTUOSHT2 in range event is not used to indicate in proximity state.
INTUOSHT2 only has one stylus.

Signed-off-by: Ping Cheng <pi...@wacom.com>
Reviewed-by: Jason Gerecke <jason.gere...@wacom.com>
Signed-off-by: Jiri Kosina <jkos...@suse.cz>
[jason.gere...@wacom.com: Imported into input-wacom repository (526d6e7)]
Fixes: http://sourceforge.net/p/linuxwacom/bugs/300/
Fixes: linuxwacom/input-wacom#13
Signed-off-by: Jason Gerecke <jason.gere...@wacom.com>
[aaron.sko...@wacom.com: backported from input-wacom repository (62bf90d)]
Signed-off-by: Aaron Skomra <aaron.sko...@wacom.com>
---
 2.6.30/wacom_wac.c |    4 +++-
 2.6.38/wacom_wac.c |    4 +++-
 3.7/wacom_wac.c    |    4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/2.6.30/wacom_wac.c b/2.6.30/wacom_wac.c
index de8169a..d37742d 100644
--- a/2.6.30/wacom_wac.c
+++ b/2.6.30/wacom_wac.c
@@ -608,6 +608,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
                case 0x885: /* Intuos3 Marker Pen */
                case 0x802: /* Intuos4/5 13HD/24HD General Pen */
                case 0x804: /* Intuos4/5 13HD/24HD Marker Pen */
+               case 0x8e2: /* IntuosHT2 pen */
                case 0x022:
                case 0x100804: /* Intuos4/5 13HD/24HD Art Pen */
                case 0x140802: /* Intuos4/5 13HD/24HD Classic Pen */
@@ -675,7 +676,8 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
 
        /* in Range */
        if ((data[1] & 0xfe) == 0x20) {
-               wacom->shared->stylus_in_proximity = true;
+               if (features->type != INTUOSHT2)
+                       wacom->shared->stylus_in_proximity = true;
 
                /* in Range while exiting */
                if (wacom->reporting_data) {
diff --git a/2.6.38/wacom_wac.c b/2.6.38/wacom_wac.c
index 763b5ae..c663c9a 100644
--- a/2.6.38/wacom_wac.c
+++ b/2.6.38/wacom_wac.c
@@ -558,6 +558,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
                case 0x885: /* Intuos3 Marker Pen */
                case 0x802: /* Intuos4/5 13HD/24HD General Pen */
                case 0x804: /* Intuos4/5 13HD/24HD Marker Pen */
+               case 0x8e2: /* IntuosHT2 pen */
                case 0x022:
                case 0x100804: /* Intuos4/5 13HD/24HD Art Pen */
                case 0x140802: /* Intuos4/5 13HD/24HD Classic Pen */
@@ -625,7 +626,8 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
 
        /* in Range */
        if ((data[1] & 0xfe) == 0x20) {
-               wacom->shared->stylus_in_proximity = true;
+               if (features->type != INTUOSHT2)
+                       wacom->shared->stylus_in_proximity = true;
 
                /* in Range while exiting */
                if (wacom->reporting_data) {
diff --git a/3.7/wacom_wac.c b/3.7/wacom_wac.c
index 07b7c8c..3459d7b 100644
--- a/3.7/wacom_wac.c
+++ b/3.7/wacom_wac.c
@@ -558,6 +558,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
                case 0x885: /* Intuos3 Marker Pen */
                case 0x802: /* Intuos4/5 13HD/24HD General Pen */
                case 0x804: /* Intuos4/5 13HD/24HD Marker Pen */
+               case 0x8e2: /* IntuosHT2 pen */
                case 0x022:
                case 0x100804: /* Intuos4/5 13HD/24HD Art Pen */
                case 0x140802: /* Intuos4/5 13HD/24HD Classic Pen */
@@ -625,7 +626,8 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
 
        /* in Range */
        if ((data[1] & 0xfe) == 0x20) {
-               wacom->shared->stylus_in_proximity = true;
+               if (features->type != INTUOSHT2)
+                       wacom->shared->stylus_in_proximity = true;
 
                /* in Range while exiting */
                if (wacom->reporting_data) {
-- 
1.7.9.5


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to