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:
@@ -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() ;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user