aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/alps.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index cd4203c4deb9..5547e2429fbe 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -132,18 +132,23 @@ static void alps_process_packet(struct psmouse *psmouse)
132 ges = packet[2] & 1; 132 ges = packet[2] & 1;
133 fin = packet[2] & 2; 133 fin = packet[2] & 2;
134 134
135 input_report_key(dev, BTN_LEFT, left);
136 input_report_key(dev, BTN_RIGHT, right);
137 input_report_key(dev, BTN_MIDDLE, middle);
138
139 if ((priv->i->flags & ALPS_DUALPOINT) && z == 127) { 135 if ((priv->i->flags & ALPS_DUALPOINT) && z == 127) {
140 input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x)); 136 input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x));
141 input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y)); 137 input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y));
138
139 input_report_key(dev2, BTN_LEFT, left);
140 input_report_key(dev2, BTN_RIGHT, right);
141 input_report_key(dev2, BTN_MIDDLE, middle);
142
142 input_sync(dev); 143 input_sync(dev);
143 input_sync(dev2); 144 input_sync(dev2);
144 return; 145 return;
145 } 146 }
146 147
148 input_report_key(dev, BTN_LEFT, left);
149 input_report_key(dev, BTN_RIGHT, right);
150 input_report_key(dev, BTN_MIDDLE, middle);
151
147 /* Convert hardware tap to a reasonable Z value */ 152 /* Convert hardware tap to a reasonable Z value */
148 if (ges && !fin) z = 40; 153 if (ges && !fin) z = 40;
149 154