]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toplevel.cpp
simplify OnActivate menubar install code
[wxWidgets.git] / src / mac / carbon / toplevel.cpp
index e176c02796137e26f15a41d33d2d1d71d2f5173b..c7c49f7f2bdd3a834370cc4fd90db34fbadb7723 100644 (file)
@@ -94,7 +94,7 @@ static const EventTypeSpec eventList[] =
 
     { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
     { kEventClassTextInput, kEventTextInputUpdateActiveInputArea } ,
-    
+
     { kEventClassWindow , kEventWindowShown } ,
     { kEventClassWindow , kEventWindowActivated } ,
     { kEventClassWindow , kEventWindowDeactivated } ,
@@ -448,7 +448,7 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
     Point screenMouseLocation = cEvent.GetParameter<Point>(kEventParamMouseLocation) ;
     Point windowMouseLocation = screenMouseLocation ;
 
-    WindowRef window ;
+    WindowRef window = NULL;
     short windowPart = ::FindWindow(screenMouseLocation, &window);
 
     wxWindow* currentMouseWindow = NULL ;
@@ -1219,7 +1219,9 @@ void  wxTopLevelWindowMac::MacCreateRealWindow(
     // the root control level handler
     MacInstallEventHandler( (WXWidget) m_peer->GetControlRef() ) ;
 
-#if TARGET_API_MAC_OSX
+    // Causes the inner part of the window not to be metal
+    // if the style is used before window creation.
+#if 0 // TARGET_API_MAC_OSX
     if ( m_macUsesCompositing && m_macWindow != NULL )
     {
         if ( GetExtraStyle() & wxFRAME_EX_METAL )
@@ -1414,11 +1416,11 @@ bool wxTopLevelWindowMac::IsFullScreen() const
     return m_macFullScreenData != NULL ;
 }
 
-void wxTopLevelWindowMac::SetExtraStyle(long exStyle) 
+void wxTopLevelWindowMac::SetExtraStyle(long exStyle)
 {
     if ( GetExtraStyle() == exStyle )
         return ;
-    
+
     wxTopLevelWindowBase::SetExtraStyle( exStyle ) ;
 
 #if TARGET_API_MAC_OSX
@@ -1431,8 +1433,8 @@ void wxTopLevelWindowMac::SetExtraStyle(long exStyle)
 #endif
 }
 
+// TODO: switch to structure bounds -
 // we are still using coordinates of the content view
-// TODO: switch to structure bounds
 //
 void wxTopLevelWindowMac::MacGetContentAreaInset( int &left , int &top , int &right , int &bottom )
 {