IsTopLevel() may return true not only for wxTLW: this fixes crash when opening a menu

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-07-25 23:34:37 +00:00
parent 082006f3ab
commit 3cd2f0bdee
2 changed files with 7 additions and 5 deletions

View File

@@ -446,16 +446,15 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
if (event->update.utype == GR_UPDATE_SIZE)
#endif
{
if (win->IsTopLevel())
wxTopLevelWindow *tlw = wxDynamicCast(win, wxTopLevelWindow);
if ( tlw )
{
wxTopLevelWindow *tlw = (wxTopLevelWindow*) win;
tlw->SetConfigureGeometry( XConfigureEventGetX(event), XConfigureEventGetY(event),
XConfigureEventGetWidth(event), XConfigureEventGetHeight(event) );
}
if (win->IsTopLevel() && win->IsShown())
if ( tlw && tlw->IsShown() )
{
wxTopLevelWindowX11 *tlw = (wxTopLevelWindowX11 *) win;
tlw->SetNeedResizeInIdle();
}
else
@@ -467,7 +466,6 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
}
}
return FALSE;
break;
}
#if !wxUSE_NANOX
case PropertyNotify: