Merge pull request #4394 from aldelaro5/fix-focus-detection-linux

Fix window focus detection on Linux (rebase from #3843)
This commit is contained in:
Anthony
2016-10-29 00:35:18 -05:00
committed by GitHub
5 changed files with 22 additions and 68 deletions

View File

@ -735,8 +735,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);
}
}
@ -928,6 +926,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);