kernel
Révision | e5c9a75e666550d0dab556d62060a5abd916d2fa (tree) |
---|---|
l'heure | 2019-01-24 18:13:26 |
Auteur | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Input: vmmouse: change wheel capability to the abs device
This makes vmmouse be classified as a regular mouse pointer
in Android.
@@ -195,7 +195,7 @@ static psmouse_ret_t vmmouse_report_events(struct psmouse *psmouse) | ||
195 | 195 | } |
196 | 196 | |
197 | 197 | /* Xorg seems to ignore wheel events on absolute devices */ |
198 | - input_report_rel(rel_dev, REL_WHEEL, -(s8)((u8) z)); | |
198 | + input_report_rel(abs_dev, REL_WHEEL, -(s8)((u8) z)); | |
199 | 199 | |
200 | 200 | vmmouse_report_button(psmouse, abs_dev, rel_dev, |
201 | 201 | pref_dev, BTN_LEFT, |
@@ -464,6 +464,7 @@ int vmmouse_init(struct psmouse *psmouse) | ||
464 | 464 | input_set_capability(abs_dev, EV_KEY, BTN_MIDDLE); |
465 | 465 | input_set_capability(abs_dev, EV_ABS, ABS_X); |
466 | 466 | input_set_capability(abs_dev, EV_ABS, ABS_Y); |
467 | + input_set_capability(abs_dev, EV_REL, REL_WHEEL); | |
467 | 468 | input_set_abs_params(abs_dev, ABS_X, 0, VMMOUSE_MAX_X, 0, 0); |
468 | 469 | input_set_abs_params(abs_dev, ABS_Y, 0, VMMOUSE_MAX_Y, 0, 0); |
469 | 470 |
@@ -471,9 +472,6 @@ int vmmouse_init(struct psmouse *psmouse) | ||
471 | 472 | if (error) |
472 | 473 | goto init_fail; |
473 | 474 | |
474 | - /* Add wheel capability to the relative device */ | |
475 | - input_set_capability(rel_dev, EV_REL, REL_WHEEL); | |
476 | - | |
477 | 475 | psmouse->protocol_handler = vmmouse_process_byte; |
478 | 476 | psmouse->disconnect = vmmouse_disconnect; |
479 | 477 | psmouse->reconnect = vmmouse_reconnect; |