From 9de9ec1fb69f5e93fc3b7fe30cc16e1032e3a4ae Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sat, 26 Jun 2010 18:50:22 +0000 Subject: [PATCH] It would appear that FindFocus() is (differently) broken on Windows. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5803 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/Frame.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 1b534d0e66..69d1ae6369 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -740,12 +740,14 @@ void CFrame::OnSizeRequest(int& x, int& y, int& width, int& height) bool CFrame::RendererHasFocus() { - if (m_RenderParent == NULL || wxWindow::FindFocus() == NULL) + if (m_RenderParent == NULL) return false; #ifdef _WIN32 if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow()) return true; #else + if (wxWindow::FindFocus() == NULL) + return false; // Why these different cases? if (m_RenderParent == wxWindow::FindFocus() || m_RenderParent == wxWindow::FindFocus()->GetParent() ||