From a3172d643fa7d4430ac1a398fa95a27ee3dfa921 Mon Sep 17 00:00:00 2001 From: Mark Roszko Date: Thu, 15 Oct 2020 04:51:07 +0000 Subject: [PATCH] Add wxTimer stallout fix to tool dispatcher --- common/tool/tool_dispatcher.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 689cb187c1..88b3c20149 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -315,6 +315,14 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) int unicode = 0; bool keyIsSpecial = false; // True if the key is a special key code +#if defined(_WIN32) + // Fix a constant stream of events being able to stall out wxTimers from firing + // Which results in GAL not updating + // https://devblogs.microsoft.com/oldnewthing/20191108-00/?p=103080 + MSG msg; + PeekMessage(&msg, nullptr, WM_TIMER, WM_TIMER, PM_NOREMOVE); +#endif + int type = aEvent.GetEventType(); // Sometimes there is no window that has the focus (it happens when another PCB_BASE_FRAME