fix(trackpad): stop scrolling when the second finger is lift off during the gesture

This commit is contained in:
Florian Didron
2025-12-04 15:08:47 +07:00
parent fa4f335051
commit 7cb4f60a21

View File

@@ -518,6 +518,13 @@ report_mouse_t navigator_trackpad_get_report(report_mouse_t mouse_report) {
// Determine mode based on finger count
if (fingers >= 2 && gesture.state != TP_SCROLLING) {
gesture.state = TP_SCROLLING;
} else if (fingers < 2 && gesture.state == TP_SCROLLING) {
// Transition from scrolling back to moving when finger is lifted
gesture.state = TP_MOVING;
# ifdef NAVIGATOR_TRACKPAD_SCROLL_INERTIA_ENABLE
// Stop scroll inertia when transitioning to cursor mode
scroll_inertia.active = false;
# endif
}
# endif