Reuse wxGetTopLevelParent() in wxStatusBar code

No real changes, just use the existing function instead of redoing what
it does.
This commit is contained in:
Vadim Zeitlin 2023-06-02 01:12:41 +01:00
parent e0ec525680
commit 3e055eeac5

View file

@ -571,17 +571,12 @@ wxStatusBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
// resizing. It is possible to send this message to any window.
if ( wParam == HTBOTTOMRIGHT )
{
wxWindow *win;
for ( win = GetParent(); win; win = win->GetParent() )
if ( wxWindow *win = wxGetTopLevelParent(this) )
{
if ( win->IsTopLevel() )
{
SendMessage(GetHwndOf(win), WM_NCLBUTTONDOWN,
wParam, lParam);
SendMessage(GetHwndOf(win), WM_NCLBUTTONDOWN,
wParam, lParam);
return 0;
}
return 0;
}
}
}