routing SetTitle to SetLabel as MSW does, fixing potential zombie pointers after mouse down events which delete windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,6 +92,7 @@ public:
|
||||
|
||||
virtual void SetTitle( const wxString& title);
|
||||
virtual wxString GetTitle() const;
|
||||
virtual void SetLabel( const wxString& title);
|
||||
|
||||
virtual void Raise();
|
||||
virtual void Lower();
|
||||
|
@@ -597,8 +597,14 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
|
||||
|
||||
if ( currentMouseWindow->GetEventHandler()->ProcessEvent(wxevent) )
|
||||
{
|
||||
/*
|
||||
// this code is dangerous in case the delete in the mouse down occured further up in the chain, trying alternative
|
||||
|
||||
if ((currentMouseWindowParent != NULL) &&
|
||||
(currentMouseWindowParent->GetChildren().Find(currentMouseWindow) == NULL))
|
||||
*/
|
||||
// deleted in the meantime
|
||||
if ( g_MacLastWindow == NULL )
|
||||
currentMouseWindow = NULL;
|
||||
|
||||
result = noErr;
|
||||
@@ -1373,6 +1379,11 @@ void wxTopLevelWindowMac::MacActivate( long timestamp , bool inIsActivating )
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMac::SetTitle(const wxString& title)
|
||||
{
|
||||
SetLabel( title ) ;
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMac::SetLabel(const wxString& title)
|
||||
{
|
||||
wxWindow::SetLabel( title ) ;
|
||||
UMASetWTitle( (WindowRef)m_macWindow , title , m_font.GetEncoding() ) ;
|
||||
|
Reference in New Issue
Block a user