mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01:00
Merge pull request #4030 from clinchergt/fix-setfocus-rendertowindow
Fix focus bug when using the "render to main window" feature
This commit is contained in:
commit
7a5bb46016
@ -710,7 +710,16 @@ void CFrame::StartGame(const std::string& filename)
|
||||
SetThreadExecutionState(ES_CONTINUOUS | shouldScreenSave | ES_SYSTEM_REQUIRED);
|
||||
#endif
|
||||
|
||||
m_RenderParent->SetFocus();
|
||||
// We need this specifically to support setting the focus properly when using
|
||||
// the 'render to main window' feature on Windows
|
||||
if (auto panel = wxDynamicCast(m_RenderParent, wxPanel))
|
||||
{
|
||||
panel->SetFocusIgnoringChildren();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_RenderParent->SetFocus();
|
||||
}
|
||||
|
||||
wxTheApp->Bind(wxEVT_KEY_DOWN, &CFrame::OnKeyDown, this);
|
||||
wxTheApp->Bind(wxEVT_RIGHT_DOWN, &CFrame::OnMouse, this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user