From 6ad766bed12292fdb5266b2b63f0c128c6d5a751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCchler?= Date: Thu, 9 May 2024 11:39:42 +0200 Subject: [PATCH 1/2] Fix PS/2 Trackpoint mouse clicks (#22265) Bug report and fix by d93921012, I'm just pushing the change. Tested on ARM ChibiOS (RP2040) with a Trackpoint from a Thinkpad T61. --- drivers/ps2/ps2_mouse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ps2/ps2_mouse.c b/drivers/ps2/ps2_mouse.c index 88c9bdcebef0..0f7b33156a05 100644 --- a/drivers/ps2/ps2_mouse.c +++ b/drivers/ps2/ps2_mouse.c @@ -99,6 +99,8 @@ void ps2_mouse_task(void) { # endif } else { if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n"); + /* return here to avoid updating the mouse button state */ + return; } #endif From f74243cafb129d7e1458d10c70b50bc8ce4c705b Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 17 May 2024 22:45:39 +0100 Subject: [PATCH 2/2] Apply fix to PS2_MOUSE_USE_REMOTE_MODE too --- drivers/ps2/ps2_mouse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ps2/ps2_mouse.c b/drivers/ps2/ps2_mouse.c index 0f7b33156a05..ef1a0e26f9e9 100644 --- a/drivers/ps2/ps2_mouse.c +++ b/drivers/ps2/ps2_mouse.c @@ -88,6 +88,8 @@ void ps2_mouse_task(void) { # endif } else { if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n"); + /* return here to avoid updating the mouse button state */ + return; } #else if (pbuf_has_data()) {