Frame: Make RendererHasFocus() compatible with the new window structure.
This commit is contained in:
parent
66fec6d0bd
commit
8d76dca30d
|
@ -722,7 +722,11 @@ bool CFrame::RendererHasFocus()
|
||||||
if (m_RenderParent == nullptr)
|
if (m_RenderParent == nullptr)
|
||||||
return false;
|
return false;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow())
|
HWND window = GetForegroundWindow();
|
||||||
|
if (window == nullptr)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (m_RenderFrame->GetHWND() == window)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
wxWindow *window = wxWindow::FindFocus();
|
wxWindow *window = wxWindow::FindFocus();
|
||||||
|
|
Loading…
Reference in New Issue