Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263874
b: refs/heads/master
c: 8f90686
h: refs/heads/master
v: v3
  • Loading branch information
Chris Bagwell authored and Dmitry Torokhov committed Sep 13, 2011
1 parent a13d907 commit fef53fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c601beaf21671b5033169d04efeda462bf58f01
refs/heads/master: 8f9068609e8a5b4cbac9e0cf8332b5dcabf05422
14 changes: 8 additions & 6 deletions trunk/drivers/input/tablet/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,20 +800,22 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
int i;

for (i = 0; i < 2; i++) {
int p = data[9 * i + 2];
bool touch = p && !wacom->shared->stylus_in_proximity;
int offset = (data[1] & 0x80) ? (8 * i) : (9 * i);
bool touch = data[offset + 3] & 0x80;

input_mt_slot(input, i);
input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
/*
* Touch events need to be disabled while stylus is
* in proximity because user's hand is resting on touchpad
* and sending unwanted events. User expects tablet buttons
* to continue working though.
*/
touch = touch && !wacom->shared->stylus_in_proximity;

input_mt_slot(input, i);
input_mt_report_slot_state(input, MT_TOOL_FINGER, touch);
if (touch) {
int x = get_unaligned_be16(&data[9 * i + 3]) & 0x7ff;
int y = get_unaligned_be16(&data[9 * i + 5]) & 0x7ff;
int x = get_unaligned_be16(&data[offset + 3]) & 0x7ff;
int y = get_unaligned_be16(&data[offset + 5]) & 0x7ff;
if (features->quirks & WACOM_QUIRK_BBTOUCH_LOWRES) {
x <<= 5;
y <<= 5;
Expand Down

0 comments on commit fef53fb

Please sign in to comment.