]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toplevel.cpp
cleanup in toplevel activation, and switching to native carbon event notification...
[wxWidgets.git] / src / mac / carbon / toplevel.cpp
index a96a6631f0a400e7450f27c76b74c0f5c03871b2..795cadc188ced98c4c7cbd29dedce7c1adabb00a 100644 (file)
@@ -512,12 +512,11 @@ static pascal OSStatus wxMacTopLevelWindowEventHandler( EventHandlerCallRef hand
         case kEventWindowActivated :
         {
             toplevelWindow->MacActivate( cEvent.GetTicks() , true) ;
-
             wxActivateEvent wxevent(wxEVT_ACTIVATE, true , toplevelWindow->GetId());
             wxevent.SetTimestamp( cEvent.GetTicks() ) ;
             wxevent.SetEventObject(toplevelWindow);
             toplevelWindow->GetEventHandler()->ProcessEvent(wxevent);
-            result = noErr ;
+            // we still sending an eventNotHandledErr in order to allow for default processing
             break ;
         }
         case kEventWindowDeactivated :
@@ -527,7 +526,7 @@ static pascal OSStatus wxMacTopLevelWindowEventHandler( EventHandlerCallRef hand
             wxevent.SetTimestamp( cEvent.GetTicks() ) ;
             wxevent.SetEventObject(toplevelWindow);
             toplevelWindow->GetEventHandler()->ProcessEvent(wxevent);
-            result = noErr ;
+            // we still sending an eventNotHandledErr in order to allow for default processing
             break ;
         }
        case kEventWindowShown :
@@ -961,8 +960,10 @@ void  wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
     {
         ::CreateRootControl( (WindowRef)m_macWindow , (ControlRef*)&m_macControl ) ;
     }
+    // the root control level handleer
     MacInstallEventHandler() ;
 
+    // the frame window event handler
     InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ;
     MacInstallTopLevelWindowEventHandler() ;