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:
@@ -256,6 +256,10 @@ wxMSW:
|
|||||||
- support for alpha channel in toolbar bitmaps (Jurgen Doornik)
|
- support for alpha channel in toolbar bitmaps (Jurgen Doornik)
|
||||||
- wxFileDialog can now be moved and centered (Randall Fox)
|
- wxFileDialog can now be moved and centered (Randall Fox)
|
||||||
|
|
||||||
|
wxUniv/X11:
|
||||||
|
|
||||||
|
- fixed fatal crash when opening a menu
|
||||||
|
|
||||||
wxWinCE:
|
wxWinCE:
|
||||||
|
|
||||||
- added automatized but customizable handling of native SmartPhone menus
|
- added automatized but customizable handling of native SmartPhone menus
|
||||||
|
@@ -446,16 +446,15 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
|
|||||||
if (event->update.utype == GR_UPDATE_SIZE)
|
if (event->update.utype == GR_UPDATE_SIZE)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (win->IsTopLevel())
|
wxTopLevelWindow *tlw = wxDynamicCast(win, wxTopLevelWindow);
|
||||||
|
if ( tlw )
|
||||||
{
|
{
|
||||||
wxTopLevelWindow *tlw = (wxTopLevelWindow*) win;
|
|
||||||
tlw->SetConfigureGeometry( XConfigureEventGetX(event), XConfigureEventGetY(event),
|
tlw->SetConfigureGeometry( XConfigureEventGetX(event), XConfigureEventGetY(event),
|
||||||
XConfigureEventGetWidth(event), XConfigureEventGetHeight(event) );
|
XConfigureEventGetWidth(event), XConfigureEventGetHeight(event) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (win->IsTopLevel() && win->IsShown())
|
if ( tlw && tlw->IsShown() )
|
||||||
{
|
{
|
||||||
wxTopLevelWindowX11 *tlw = (wxTopLevelWindowX11 *) win;
|
|
||||||
tlw->SetNeedResizeInIdle();
|
tlw->SetNeedResizeInIdle();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -467,7 +466,6 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
#if !wxUSE_NANOX
|
#if !wxUSE_NANOX
|
||||||
case PropertyNotify:
|
case PropertyNotify:
|
||||||
|
Reference in New Issue
Block a user