Force focus back to canvas after popup

Following the hotkey popup, we need to place the input focus back to the
canvas to receive the next event

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15737
This commit is contained in:
Seth Hillbrand 2023-09-28 10:51:20 -07:00
parent 5f88c132c9
commit c73c2360a4
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ HOTKEY_CYCLE_POPUP::HOTKEY_CYCLE_POPUP( EDA_DRAW_FRAME* aParent ) :
m_drawFrame( aParent )
{
m_showTimer = new wxTimer( this );
Bind( wxEVT_TIMER, [&]( wxTimerEvent& ) { Show( false ); },
Bind( wxEVT_TIMER, [&]( wxTimerEvent& ) { Show( false ); m_drawFrame->GetCanvas()->SetFocus(); },
m_showTimer->GetId() );
// On macOS, we can't change focus to the canvas before sending the event, so the key events