Commit 18675ceb authored by José Expósito's avatar José Expósito Committed by Lipeng Sang
Browse files

HID: magicmouse: Do not set BTN_MOUSE on double report

stable inclusion
from stable-v5.10.152
commit 39d10f0dfb7201cbd722706e0c428e4f7d89281f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I73HJ0

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=39d10f0dfb7201cbd722706e0c428e4f7d89281f

--------------------------------

[ Upstream commit bb5f0c85 ]

Under certain conditions the Magic Trackpad can group 2 reports in a
single packet. The packet is split and the raw event function is
invoked recursively for each part.

However, after processing each part, the BTN_MOUSE status is updated,
sending multiple click events. [1]

Return after processing double reports to avoid this issue.

Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/811

  # [1]
Fixes: a462230e ("HID: magicmouse: enable Magic Trackpad support")
Reported-by: default avatarNulo <git@nulo.in>
Signed-off-by: default avatarJosé Expósito <jose.exposito89@gmail.com>
Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20221009182747.90730-1-jose.exposito89@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent efcd9aec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment