X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b74c3ac7c4cac714eeb2ebc50eaea69d3e83695..ff3d11a0ab976879ff87c826f660786fee172ed9:/src/mac/app.cpp

diff --git a/src/mac/app.cpp b/src/mac/app.cpp
index fd4397a047..5cc6077376 100644
--- a/src/mac/app.cpp
+++ b/src/mac/app.cpp
@@ -40,7 +40,7 @@
 
 // mac
 
-#ifndef __UNIX__
+#ifndef __DARWIN__
   #if __option(profile)
 	#include <profiler.h>
   #endif
@@ -52,7 +52,7 @@
 #include "wx/mac/macnotfy.h"
 
 #if wxUSE_SOCKETS
-    #ifdef __APPLE__
+    #ifdef __DARWIN__
         #include <CoreServices/CoreServices.h>
     #else
         #include <OpenTransport.h>
@@ -374,7 +374,7 @@ bool wxApp::Initialize()
 #endif
 
 
-#ifndef __UNIX__
+#ifndef __DARWIN__
   // test the minimal configuration necessary
 
 	#if !TARGET_CARBON
@@ -427,7 +427,7 @@ bool wxApp::Initialize()
 	  return FALSE ;
   }
 
-#ifndef __UNIX__
+#ifndef __DARWIN__
   #if __option(profile)
 	ProfilerInit( collectDetailed, bestTimeBase , 20000 , 40 ) ;
   #endif
@@ -435,7 +435,7 @@ bool wxApp::Initialize()
 
   // now avoid exceptions thrown for new (bad_alloc)
 
-#ifndef __UNIX__
+#ifndef __DARWIN__
   std::__throws_bad_alloc = FALSE ;
 #endif
 
@@ -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();
@@ -542,7 +544,7 @@ void wxApp::CleanUp()
 
   wxClassInfo::CleanUpClasses();
 
-#ifndef __UNIX__
+#ifndef __DARWIN__
   #if __option(profile)
   ProfilerDump( "\papp.prof" ) ;
   ProfilerTerm() ;
@@ -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