X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0a67a93b17c37c018f60e662645ee2a44ba4e58e..2cc78389312dce6285d0d6b6e891d24372252ada:/src/mac/app.cpp diff --git a/src/mac/app.cpp b/src/mac/app.cpp index 314d307ec8..4e4699db1d 100644 --- a/src/mac/app.cpp +++ b/src/mac/app.cpp @@ -353,14 +353,14 @@ bool wxApp::Initialize() SetEventMask( everyEvent ) ; UMAShowWatchCursor() ; -#ifdef __UNIX__ - AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments , AEHandleODoc , +#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340) + AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments , NewAEEventHandlerUPP(AEHandleODoc) , (long) wxTheApp , FALSE ) ; - AEInstallEventHandler( kCoreEventClass , kAEOpenApplication , AEHandleOApp , + AEInstallEventHandler( kCoreEventClass , kAEOpenApplication , NewAEEventHandlerUPP(AEHandleOApp) , (long) wxTheApp , FALSE ) ; - AEInstallEventHandler( kCoreEventClass , kAEPrintDocuments , AEHandlePDoc , + AEInstallEventHandler( kCoreEventClass , kAEPrintDocuments , NewAEEventHandlerUPP(AEHandlePDoc) , (long) wxTheApp , FALSE ) ; - AEInstallEventHandler( kCoreEventClass , kAEQuitApplication , AEHandleQuit , + AEInstallEventHandler( kCoreEventClass , kAEQuitApplication , NewAEEventHandlerUPP(AEHandleQuit) , (long) wxTheApp , FALSE ) ; #else AEInstallEventHandler( kCoreEventClass , kAEOpenDocuments , NewAEEventHandlerProc(AEHandleODoc) , @@ -459,6 +459,7 @@ bool wxApp::Initialize() wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING); wxTheColourDatabase->Initialize(); +#ifdef __WXDEBUG__ #if wxUSE_LOG // flush the logged messages if any and install a 'safer' log target: the // default one (wxLogGui) can't be used after the resources are freed just @@ -469,6 +470,7 @@ bool wxApp::Initialize() // this will flush the old messages if any delete wxLog::SetActiveTarget(new wxLogStderr); #endif // wxUSE_LOG +#endif wxInitializeStockLists(); wxInitializeStockObjects(); @@ -900,11 +902,13 @@ bool wxYield() #endif EventRecord event ; - long sleepTime = 0 ; //::GetCaretTime(); + long sleepTime = 1 ; //::GetCaretTime(); while ( !wxTheApp->IsExiting() && WaitNextEvent(everyEvent, &event,sleepTime, wxApp::s_macCursorRgn)) { wxTheApp->MacHandleOneEvent( &event ); + if ( event.what != kHighLevelEvent ) + SetRectRgn( wxApp::s_macCursorRgn , event.where.h , event.where.v , event.where.h + 1 , event.where.v + 1 ) ; } wxMacProcessNotifierAndPendingEvents() ; @@ -981,7 +985,7 @@ void wxApp::MacDoOneEvent() wxTheApp->ProcessIdle() ; } if ( event.what != kHighLevelEvent ) - SetRectRgn( s_macCursorRgn , event.where.h - 1 , event.where.v - 1, event.where.h + 1 , event.where.v + 1 ) ; + SetRectRgn( s_macCursorRgn , event.where.h , event.where.v , event.where.h + 1 , event.where.v + 1 ) ; // repeaters @@ -1194,6 +1198,8 @@ void wxApp::MacHandleMouseDownEvent( EventRecord *ev ) } else { + if ( win ) + win->MacMouseDown( ev , windowPart ) ; UMASelectWindow( window ) ; } }