]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/app.cpp
ghost button fix (was calling another baseclass create)
[wxWidgets.git] / src / mac / carbon / app.cpp
index 381dc7fb4281c8599448e5549be93fbcc3d54ae3..6c43daf5d846989bb383cf2ebc44fcbe9821ca8b 100644 (file)
@@ -107,7 +107,7 @@ long      wxApp::s_lastModifiers = 0 ;
 bool      wxApp::s_macDefaultEncodingIsPC = true ;
 bool      wxApp::s_macSupportPCMenuShortcuts = true ;
 long      wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
 bool      wxApp::s_macDefaultEncodingIsPC = true ;
 bool      wxApp::s_macSupportPCMenuShortcuts = true ;
 long      wxApp::s_macAboutMenuItemId = wxID_ABOUT ;
-long      wxApp::s_macPreferencesMenuItemId = 0 ;
+long      wxApp::s_macPreferencesMenuItemId = wxID_PREFERENCES ;
 long      wxApp::s_macExitMenuItemId = wxID_EXIT ;
 wxString  wxApp::s_macHelpMenuTitleName = wxT("&Help") ;
 
 long      wxApp::s_macExitMenuItemId = wxID_EXIT ;
 wxString  wxApp::s_macHelpMenuTitleName = wxT("&Help") ;
 
@@ -570,7 +570,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
 
 #ifndef __DARWIN__
 #  if __option(profile)
 
 #ifndef __DARWIN__
 #  if __option(profile)
-    ProfilerInit( collectDetailed, bestTimeBase , 20000 , 40 ) ;
+    ProfilerInit( collectDetailed, bestTimeBase , 40000 , 50 ) ;
 #  endif
 #endif
 
 #  endif
 #endif
 
@@ -1540,9 +1540,12 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr )
                     }
                     else
                     {
                     }
                     else
                     {
+                        // Activate window first
+                        ::SelectWindow( window ) ;
+                        
+                        // Send event later
                         if ( win )
                             win->MacMouseDown( ev , windowPart ) ;
                         if ( win )
                             win->MacMouseDown( ev , windowPart ) ;
-                        ::SelectWindow( window ) ;
                     }
                 }
                 else
                     }
                 }
                 else