From 833534537d68b380eb823d744435e7f5cae6293a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 12 Dec 2017 17:02:15 +0000 Subject: [PATCH] Fix touchpad tapping. Don't apply missing-mouse-up logic to mouse-down events. The logic depends on mouse-state, and the OS-synthesized mouse-up and mouse-down events from a tap don't contain any state. Fixes: lp:1737010 * https://bugs.launchpad.net/kicad/+bug/1737010 --- common/tool/tool_dispatcher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index feacd15aef..a19ce9937b 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -169,7 +169,8 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti // in the dragging mode even if the mouse button is not held anymore if( st->pressed && !state ) up = true; - else if( !st->pressed && state ) + // Don't apply same logic to down events as it kills touchpad tapping + else if( !st->pressed && type == st->downEvent ) down = true; }