]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
wxUniv compilation fixes (patch 559620)
[wxWidgets.git] / src / common / wincmn.cpp
index ec067000819a6078158c599c652ef83134776d33..5922d27f4ab92cfdad82ecd993250823a98fc6ac 100644 (file)
@@ -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;
+}
+