mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 06:48:33 +00:00
Fix window focus detection on Linux
On Linux, the FindFocus method from wx simply doesn't work, it would on some environment report that dolphin has the focus while it doesn't have it. This is why an alternative method has to be used which is to set a focus flag whenever the render frame gets activated.
This commit is contained in:
parent
2536e37ec5
commit
2005b4430f
3 changed files with 15 additions and 55 deletions
|
@ -733,8 +733,6 @@ void CFrame::StartGame(const std::string& filename)
|
|||
wxTheApp->Bind(wxEVT_MIDDLE_DOWN, &CFrame::OnMouse, this);
|
||||
wxTheApp->Bind(wxEVT_MIDDLE_UP, &CFrame::OnMouse, this);
|
||||
wxTheApp->Bind(wxEVT_MOTION, &CFrame::OnMouse, this);
|
||||
wxTheApp->Bind(wxEVT_SET_FOCUS, &CFrame::OnFocusChange, this);
|
||||
wxTheApp->Bind(wxEVT_KILL_FOCUS, &CFrame::OnFocusChange, this);
|
||||
m_RenderParent->Bind(wxEVT_SIZE, &CFrame::OnRenderParentResize, this);
|
||||
}
|
||||
}
|
||||
|
@ -926,6 +924,8 @@ void CFrame::OnStopped()
|
|||
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() & ~wxSTAY_ON_TOP);
|
||||
}
|
||||
m_RenderParent = nullptr;
|
||||
m_bRendererHasFocus = false;
|
||||
m_RenderFrame = nullptr;
|
||||
|
||||
// Clean framerate indications from the status bar.
|
||||
GetStatusBar()->SetStatusText(" ", 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue