File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -706,13 +706,16 @@ bool CFrame::RendererHasFocus()
706
706
if (m_RenderParent->GetParent ()->GetHWND () == GetForegroundWindow ())
707
707
return true ;
708
708
#else
709
- if (wxWindow::FindFocus () == nullptr )
709
+ wxWindow *window = wxWindow::FindFocus ();
710
+ if (window == nullptr )
710
711
return false ;
711
712
// Why these different cases?
712
- if (m_RenderParent == wxWindow::FindFocus () ||
713
- m_RenderParent == wxWindow::FindFocus ()->GetParent () ||
714
- m_RenderParent->GetParent () == wxWindow::FindFocus ()->GetParent ())
713
+ if (m_RenderParent == window ||
714
+ m_RenderParent == window->GetParent () ||
715
+ m_RenderParent->GetParent () == window->GetParent ())
716
+ {
715
717
return true ;
718
+ }
716
719
#endif
717
720
return false ;
718
721
}
You can’t perform that action at this time.
0 commit comments