diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 582e40640b..1b534d0e66 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -740,16 +740,19 @@ void CFrame::OnSizeRequest(int& x, int& y, int& width, int& height) bool CFrame::RendererHasFocus() { + if (m_RenderParent == NULL || wxWindow::FindFocus() == NULL) + return false; #ifdef _WIN32 - // Why doesn't the "else" method below work in windows when called from - // Host_RendererHasFocus()? - if (m_RenderParent) - if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow()) - return true; - return false; + if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow()) + return true; #else - return m_RenderParent && (m_RenderParent == wxWindow::FindFocus()); + // Why these different cases? + if (m_RenderParent == wxWindow::FindFocus() || + m_RenderParent == wxWindow::FindFocus()->GetParent() || + m_RenderParent->GetParent() == wxWindow::FindFocus()->GetParent()) + return true; #endif + return false; } void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event)) diff --git a/Source/Plugins/Plugin_Wiimote/Src/main.cpp b/Source/Plugins/Plugin_Wiimote/Src/main.cpp index f0430bf4c0..0807219654 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/main.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/main.cpp @@ -411,9 +411,6 @@ unsigned int Wiimote_UnPairWiimotes() bool IsFocus() { -#if defined(__APPLE__) && defined(USE_WX) && USE_WX - return true; /* XXX */ -#endif return g_WiimoteInitialize.pRendererHasFocus(); }