@@ -120,6 +120,7 @@ MODULE_PARM_DESC(report_undeciphered, "Report undeciphered multi-touch state fie
120120 * @ntouches: Number of touches in most recent touch report.
121121 * @scroll_accel: Number of consecutive scroll motions.
122122 * @scroll_jiffies: Time of last scroll motion.
123+ * @pos: multi touch position data of the last report.
123124 * @touches: Most recent data for a touch, indexed by tracking ID.
124125 * @tracking_ids: Mapping of current touch input data to @touches.
125126 * @hdev: Pointer to the underlying HID device.
@@ -134,9 +135,8 @@ struct magicmouse_sc {
134135 int scroll_accel ;
135136 unsigned long scroll_jiffies ;
136137
138+ struct input_mt_pos pos [MAX_CONTACTS ];
137139 struct {
138- short x ;
139- short y ;
140140 short scroll_x ;
141141 short scroll_y ;
142142 short scroll_x_hr ;
@@ -193,7 +193,7 @@ static void magicmouse_emit_buttons(struct magicmouse_sc *msc, int state)
193193 } else if (last_state != 0 ) {
194194 state = last_state ;
195195 } else if ((id = magicmouse_firm_touch (msc )) >= 0 ) {
196- int x = msc -> touches [id ].x ;
196+ int x = msc -> pos [id ].x ;
197197 if (x < middle_button_start )
198198 state = 1 ;
199199 else if (x > middle_button_stop )
@@ -256,8 +256,8 @@ static void magicmouse_emit_touch(struct magicmouse_sc *msc, int raw_id, u8 *tda
256256
257257 /* Store tracking ID and other fields. */
258258 msc -> tracking_ids [raw_id ] = id ;
259- msc -> touches [id ].x = x ;
260- msc -> touches [id ].y = y ;
259+ msc -> pos [id ].x = x ;
260+ msc -> pos [id ].y = y ;
261261 msc -> touches [id ].size = size ;
262262
263263 /* If requested, emulate a scroll wheel by detecting small
0 commit comments