diff --git a/include/wx/mac/carbon/toplevel.h b/include/wx/mac/carbon/toplevel.h index 53f84f23fc..e6d72de034 100644 --- a/include/wx/mac/carbon/toplevel.h +++ b/include/wx/mac/carbon/toplevel.h @@ -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(); diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 9b019ff439..0afd6cb70c 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -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() ) ;