]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
correct hhp2cached path
[wxWidgets.git] / src / mac / carbon / window.cpp
index cfc4c763ab7c4f4237677db2166a2598e8cdfc25..acb4a6b6cbb97ee3573a82936da9374a3cd498e7 100644 (file)
@@ -232,17 +232,21 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
                     bool created = false ;
                     CGContextRef cgContext = NULL ;
                     OSStatus err = cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef, &cgContext) ;
-                    wxASSERT_MSG( err == noErr , wxT("Unable to retrieve CGContextRef") ) ;
+                    if ( err != noErr )
+                    {
+                        wxFAIL_MSG("Unable to retrieve CGContextRef");
+                    }
+
                     thisWindow->MacSetCGContextRef( cgContext ) ;
 
                     {
                         wxMacCGContextStateSaver sg( cgContext ) ;
-                        float alpha = 1.0 ;
+                        CGFloat alpha = (CGFloat)1.0 ;
                         {
                             wxWindow* iter = thisWindow ;
                             while ( iter )
                             {
-                                alpha *= (float) iter->GetTransparent()/255.0 ;
+                                alpha *= (CGFloat)( iter->GetTransparent()/255.0 ) ;
                                 if ( iter->IsTopLevel() )
                                     iter = NULL ;
                                 else
@@ -2247,7 +2251,7 @@ void  wxWindowMac::MacPaintGrowBox()
         }
         else
         {
-            CGContextSetRGBFillColor( cgContext, 1.0, 1.0 , 1.0 , 1.0 );
+            CGContextSetRGBFillColor( cgContext, (CGFloat) 1.0, (CGFloat)1.0 ,(CGFloat) 1.0 , (CGFloat)1.0 );
         }
         CGContextFillRect( cgContext, cgrect );
         CGContextRestoreGState( cgContext );
@@ -3216,13 +3220,13 @@ bool wxWindowMac::IsShownOnScreen() const
             // CS : put a breakpoint here to investigate differences
             // between native an wx visibilities
             // the only place where I've encountered them until now
-            // are the hiding/showing sequences where the vis-changed event is 
+            // are the hiding/showing sequences where the vis-changed event is
             // first sent to the innermost control, while wx does things
             // from the outmost control
             wxVis = wxWindowBase::IsShownOnScreen();
             return wxVis;
         }
-        
+
         return m_peer->IsVisible();
     }
 #endif