wacom->tool[idx] = BTN_TOOL_PEN;
break;
}
+ wacom->shared->stylus_in_proximity = true;
return 1;
}
- wacom->shared->stylus_in_proximity = true;
- if (wacom->shared->touch_down)
- return 1;
+ /* in Range */
+ if ((data[1] & 0xfe) == 0x20) {
+ wacom->shared->stylus_in_proximity = true;
- /* in Range while exiting */
- if (((data[1] & 0xfe) == 0x20) && wacom->reporting_data) {
- input_report_key(input, BTN_TOUCH, 0);
- input_report_abs(input, ABS_PRESSURE, 0);
- input_report_abs(input, ABS_DISTANCE, wacom->features.distance_max);
- return 2;
+ /* in Range while exiting */
+ if (wacom->reporting_data) {
+ input_report_key(input, BTN_TOUCH, 0);
+ input_report_abs(input, ABS_PRESSURE, 0);
+ input_report_abs(input, ABS_DISTANCE, wacom->features.distance_max);
+ return 2;
+ }
+ return 1;
}
/* Exit report */
data[0] != WACOM_REPORT_INTUOS_PEN)
return 0;
+ if (wacom->shared->touch_down)
+ return 1;
+
/* don't report events if we don't know the tool ID */
if (!wacom->id[idx]) {
/* but reschedule a read of the current tool */