fixes for popupwin

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-06-13 22:55:58 +00:00
parent 56a25b3eb8
commit af81408a3e
6 changed files with 153 additions and 75 deletions

View File

@@ -53,6 +53,10 @@
#include "wx/caret.h"
#endif
#if wxUSE_POPUPWIN
#include "wx/popupwin.h"
#endif
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
#endif
@@ -3142,8 +3146,16 @@ WXWindow wxWindowMac::MacGetTopLevelWindowRef() const
while ( iter )
{
if ( iter->IsTopLevel() )
return ((wxTopLevelWindow*)iter)->MacGetWindowRef() ;
{
wxTopLevelWindow* toplevel = wxDynamicCast(iter,wxTopLevelWindow);
if ( toplevel )
return toplevel->MacGetWindowRef();
#if wxUSE_POPUPWIN
wxPopupWindow* popupwin = wxDynamicCast(iter,wxPopupWindow);
if ( popupwin )
return popupwin->MacGetPopupWindowRef();
#endif
}
iter = iter->GetParent() ;
}