X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c393c0a564ec9197b8441d9c106f46509c99729..30962327c9d5a850d9dc00864b1ffb448a832e6f:/src/mac/carbon/toplevel.cpp diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 735fd048ee..8fe730574b 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -56,6 +56,13 @@ //For targeting OSX #include "wx/mac/private.h" +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// trace mask for activation tracing messages +static const wxChar *TRACE_ACTIVATE = _T("activation"); + // ---------------------------------------------------------------------------- // globals // ---------------------------------------------------------------------------- @@ -473,6 +480,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev if ( wxApp::s_captureWindow ) { window = (WindowRef) wxApp::s_captureWindow->MacGetTopLevelWindowRef() ; + windowPart = inContent ; } #endif @@ -818,34 +826,6 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxMacTopLevelEventHandler ) // Find an item given the Macintosh Window Reference -#if KEY_wxList_DEPRECATED -wxList wxWinMacWindowList(wxKEY_INTEGER); -wxTopLevelWindowMac *wxFindWinFromMacWindow(WindowRef inWindowRef) -{ - wxNode *node = wxWinMacWindowList.Find((long)inWindowRef); - if (!node) - return NULL; - return (wxTopLevelWindowMac *)node->GetData(); -} - -void wxAssociateWinWithMacWindow(WindowRef inWindowRef, wxTopLevelWindowMac *win) ; -void wxAssociateWinWithMacWindow(WindowRef inWindowRef, wxTopLevelWindowMac *win) -{ - // adding NULL WindowRef is (first) surely a result of an error and - // (secondly) breaks menu command processing - wxCHECK_RET( inWindowRef != (WindowRef) NULL, wxT("attempt to add a NULL WindowRef to window list") ); - - if ( !wxWinMacWindowList.Find((long)inWindowRef) ) - wxWinMacWindowList.Append((long)inWindowRef, win); -} - -void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) ; -void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) -{ - wxWinMacWindowList.DeleteObject(win); -} -#else - WX_DECLARE_HASH_MAP(WindowRef, wxTopLevelWindowMac*, wxPointerHash, wxPointerEqual, MacWindowMap); static MacWindowMap wxWinMacWindowList; @@ -880,7 +860,6 @@ void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) } } } -#endif // deprecated wxList // ---------------------------------------------------------------------------- // wxTopLevelWindowMac creation @@ -1272,14 +1251,16 @@ void wxTopLevelWindowMac::MacDelayedDeactivation(long timestamp) { if(s_macDeactivateWindow) { - wxLogDebug(wxT("Doing delayed deactivation of %p"),s_macDeactivateWindow); + wxLogTrace(TRACE_ACTIVATE, + wxT("Doing delayed deactivation of %p"), + s_macDeactivateWindow); s_macDeactivateWindow->MacActivate(timestamp, false); } } void wxTopLevelWindowMac::MacActivate( long timestamp , bool inIsActivating ) { - // wxLogDebug(wxT("TopLevel=%p::MacActivate"),this); + wxLogTrace(TRACE_ACTIVATE, wxT("TopLevel=%p::MacActivate"), this); if(s_macDeactivateWindow==this) s_macDeactivateWindow=NULL;