From c0bc2f1beee584984b2e6e738d437a2e71b47017 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 15 Sep 2017 11:28:11 +0200 Subject: [PATCH] Try to fix an overzealous event propagation that creates some key events (arrows, page up page down and some others) and mouse events called twice. the first call is the right call, the last call being the default handler. --- common/tool/tool_dispatcher.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 2d0906b88a..07c33c8b60 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -323,20 +323,9 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( evt ) m_toolMgr->ProcessEvent( *evt ); - - // pass the event to the GUI, it might still be interested in it -#ifdef __APPLE__ - // On OS X, key events are always meant to be caught. An uncaught key event is assumed - // to be a user input error by OS X (as they are pressing keys in a context where nothing - // is there to catch the event). This annoyingly makes OS X beep and/or flash the screen - // in pcbnew and the footprint editor any time a hotkey is used. The correct procedure is - // to NOT pass key events to the GUI under OS X. - - if( type != wxEVT_CHAR ) + else + // pass the event to the GUI, it might still be interested in it aEvent.Skip(); -#else - aEvent.Skip(); -#endif updateUI(); }