]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toplevel.cpp
added tlw include
[wxWidgets.git] / src / mac / carbon / toplevel.cpp
index f527792360d273253bce768b564bc2c6ab9d2e92..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() ;
     
@@ -1013,6 +1014,7 @@ void wxTopLevelWindowMac::MacActivate( long timestamp , bool inIsActivating )
     if(s_macDeactivateWindow==this)
         s_macDeactivateWindow=NULL;
     MacDelayedDeactivation(timestamp);
+    MacPropagateHiliteChanged() ;
 }
 
 void wxTopLevelWindowMac::SetTitle(const wxString& title)
@@ -1107,6 +1109,15 @@ void wxTopLevelWindowMac::MacSetMetalAppearance( bool set )
 #endif
 }
 
+bool wxTopLevelWindowMac::MacGetMetalAppearance() const 
+{
+#if TARGET_API_MAC_OSX
+    return MacGetWindowAttributes() & kWindowMetalAttribute ;
+#else
+    return false ;
+#endif
+}
+
 void wxTopLevelWindowMac::MacChangeWindowAttributes( wxUint32 attributesToSet , wxUint32 attributesToClear ) 
 {
     ChangeWindowAttributes ( (WindowRef) m_macWindow , attributesToSet, attributesToClear ) ;