]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/window.cpp
supporting switching back background style from transparent on tlws
[wxWidgets.git] / src / osx / carbon / window.cpp
index 1e54d5a279a86d0d32bd462fed7c6a88dcbf2484..cab7af9aad2e9a82c2b6095e371713d34c4bb0bf 100644 (file)
@@ -188,7 +188,13 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
                     OSStatus err = cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef, &cgContext) ;
                     if ( err != noErr )
                     {
-                        wxFAIL_MSG("Unable to retrieve CGContextRef");
+                        // for non-composite drawing, since we don't support it ourselves, send it through the
+                        // the default handler
+                        // CallNextEventHandler( handler,event ) ;
+                        // result = noErr ;
+                        if ( allocatedRgn )
+                            CFRelease( allocatedRgn ) ;
+                        break;
                     }
 
                     thisWindow->MacSetCGContextRef( cgContext ) ;
@@ -1515,6 +1521,8 @@ wxWidgetImplType* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now )
     }
 
     // the root control level handler
-    contentview->InstallEventHandler() ;
+    if ( !now->IsNativeWindowWrapper() )
+        contentview->InstallEventHandler() ;
+    
     return contentview;
 }