X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/566d84a7c3c06956562b9f8ac364aa3bad760c10..81b32ce52247c45d278507ebeb532e2535bbe186:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index ec06700081..5922d27f4a 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1795,4 +1795,15 @@ void wxWindowBase::ReleaseMouse() GetCapture()); } -// vi:sts=4:sw=4:et +// ---------------------------------------------------------------------------- +// global functions +// ---------------------------------------------------------------------------- + +wxWindow* wxGetTopLevelParent(wxWindow *win) +{ + while ( win && !win->IsTopLevel() ) + win = win->GetParent(); + + return win; +} +