Commit 7b4019d0 authored by Vojtech Pavlik's avatar Vojtech Pavlik Committed by Dmitry Torokhov

Input: psmouse - wheel mice (imps, exps) always have 3rd button

There are wheel mice that respond to Logitech probes and report
that they have only 2 buttons (such as e-Aser mouse) and this
stops the wheel from being used as a middle button. Change the
driver to always report BTN_MIDDLE capability if a wheel is
present.

Also, never reset BTN_RIGHT capability in logips2pp code - there
are no Logitech mice that have only one button and if some other
mice happen to respond to Logitech's query we could do the wrong
thing.
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent bc5d0482
...@@ -385,8 +385,6 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties) ...@@ -385,8 +385,6 @@ int ps2pp_init(struct psmouse *psmouse, int set_properties)
if (buttons < 3) if (buttons < 3)
clear_bit(BTN_MIDDLE, psmouse->dev.keybit); clear_bit(BTN_MIDDLE, psmouse->dev.keybit);
if (buttons < 2)
clear_bit(BTN_RIGHT, psmouse->dev.keybit);
if (model_info) if (model_info)
ps2pp_set_model_properties(psmouse, model_info, use_ps2pp); ps2pp_set_model_properties(psmouse, model_info, use_ps2pp);
......
...@@ -344,6 +344,7 @@ static int intellimouse_detect(struct psmouse *psmouse, int set_properties) ...@@ -344,6 +344,7 @@ static int intellimouse_detect(struct psmouse *psmouse, int set_properties)
return -1; return -1;
if (set_properties) { if (set_properties) {
set_bit(BTN_MIDDLE, psmouse->dev.keybit);
set_bit(REL_WHEEL, psmouse->dev.relbit); set_bit(REL_WHEEL, psmouse->dev.relbit);
if (!psmouse->vendor) psmouse->vendor = "Generic"; if (!psmouse->vendor) psmouse->vendor = "Generic";
...@@ -376,6 +377,7 @@ static int im_explorer_detect(struct psmouse *psmouse, int set_properties) ...@@ -376,6 +377,7 @@ static int im_explorer_detect(struct psmouse *psmouse, int set_properties)
return -1; return -1;
if (set_properties) { if (set_properties) {
set_bit(BTN_MIDDLE, psmouse->dev.keybit);
set_bit(REL_WHEEL, psmouse->dev.relbit); set_bit(REL_WHEEL, psmouse->dev.relbit);
set_bit(BTN_SIDE, psmouse->dev.keybit); set_bit(BTN_SIDE, psmouse->dev.keybit);
set_bit(BTN_EXTRA, psmouse->dev.keybit); set_bit(BTN_EXTRA, psmouse->dev.keybit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment