Move the timer fix to the dispatcher to just always run

This commit is contained in:
Marek Roszko 2020-10-15 00:38:32 -04:00
parent afa9344444
commit f38676fc46
2 changed files with 5 additions and 5 deletions

View File

@ -40,7 +40,6 @@
#include <gal/opengl/opengl_gal.h> #include <gal/opengl/opengl_gal.h>
#include <gal/cairo/cairo_gal.h> #include <gal/cairo/cairo_gal.h>
#include <kiplatform/app.h>
#include <tool/tool_dispatcher.h> #include <tool/tool_dispatcher.h>
#include <tool/tool_manager.h> #include <tool/tool_manager.h>
@ -297,10 +296,6 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent )
void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect ) void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
{ {
// Call to ensure the refresh timer eventually fires during rapid mouse moves
// Required for win32
KIPLATFORM::APP::ForceTimerMessagesToBeCreatedIfNecessary();
if( m_pendingRefresh ) if( m_pendingRefresh )
return; return;

View File

@ -40,6 +40,7 @@
#include <core/optional.h> #include <core/optional.h>
#include <wx/stc/stc.h> #include <wx/stc/stc.h>
#include <kiplatform/app.h>
///> Stores information about a mouse button state ///> Stores information about a mouse button state
struct TOOL_DISPATCHER::BUTTON_STATE struct TOOL_DISPATCHER::BUTTON_STATE
@ -417,6 +418,10 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
bool keyIsSpecial = false; // True if the key is a special key code bool keyIsSpecial = false; // True if the key is a special key code
wxWindow* focus = wxWindow::FindFocus(); wxWindow* focus = wxWindow::FindFocus();
// Required in win32 to ensure wxTimer events get scheduled in between other events
// Or else we may stall them out entirely and never get them during actions like rapid mouse moves
KIPLATFORM::APP::ForceTimerMessagesToBeCreatedIfNecessary();
int type = aEvent.GetEventType(); int type = aEvent.GetEventType();
// Sometimes there is no window that has the focus (it happens when another PCB_BASE_FRAME // Sometimes there is no window that has the focus (it happens when another PCB_BASE_FRAME