]> git.baikalelectronics.ru Git - kernel.git/commit
HID: magicmouse: fix 3 button emulation of Mouse 2
authorJohn Chen <johnchen902@gmail.com>
Tue, 30 Mar 2021 11:33:17 +0000 (19:33 +0800)
committerJiri Kosina <jkosina@suse.cz>
Wed, 7 Apr 2021 11:15:05 +0000 (13:15 +0200)
commit4db89bc2ef9ca2f6c29f6b416db20d3121e42247
tree13336f092b860ca70915ef95e3801091dd279679
parent77c7568f1f1f86a631f61e5a348fc926ae9b3f54
HID: magicmouse: fix 3 button emulation of Mouse 2

It is observed that, with 3 button emulation, when middle button is
clicked, either the left button or right button is clicked as well. It
is caused by hidinput "correctly" acting on the event, oblivious to the
3 button emulation.

As raw_event has taken care of everything, no further processing is
needed. However, the only way to stop at raw_event is to return an error
(negative) value. Therefore, the processing is stopped at event instead.

[jkosina@suse.cz: fix comment style]
Signed-off-by: John Chen <johnchen902@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-magicmouse.c