diff options
| author | RenaKunisaki <hyperhacker@gmail.com> | 2016-05-16 15:09:59 -0400 |
|---|---|---|
| committer | aldelaro5 <aldelaro5@gmail.com> | 2016-10-28 18:47:08 -0400 |
| commit | 2005b4430fa91a89da35e39b356317a72cf86cf0 (patch) | |
| tree | a0ab1d2fe82a2aa976370976f09914bce2ce4cca /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | 2536e37ec518c8d0e949ec7780ee0fb53e8b066e (diff) | |
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.
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index a4e3a0ae52..fb85d22cc4 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -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); |
