From 5f16f4ab99fed1d74e8c35b63cd37a2724cefb41 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 20 Sep 2023 17:37:07 -0700 Subject: [PATCH] Focus back to the main window after dialog Mouse actions would focus the window but we explicitly set it here to allow keyboard shortcuts Fixes https://gitlab.com/kicad/code/kicad/-/issues/15603 (cherry picked from commit b2ef620ea6d30eb5d0fe6cc1bfdedddd9a8c8278) --- common/dialog_shim.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/dialog_shim.cpp b/common/dialog_shim.cpp index 479c710950..4b7aeadc13 100644 --- a/common/dialog_shim.cpp +++ b/common/dialog_shim.cpp @@ -282,6 +282,9 @@ bool DIALOG_SHIM::Show( bool show ) ret = wxDialog::Show( show ); } + if( m_parent ) + m_parent->SetFocus(); + return ret; } @@ -483,6 +486,9 @@ int DIALOG_SHIM::ShowQuasiModal() m_qmodal_showing = false; + if( parent ) + parent->SetFocus(); + return GetReturnCode(); }