]> 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 09f448a83c2c6da6234a934fca0c5f624e157b63..cab7af9aad2e9a82c2b6095e371713d34c4bb0bf 100644 (file)
@@ -65,7 +65,7 @@
 #include "wx/osx/uma.h"
 #else
 #include "wx/osx/private.h"
-// bring in themeing
+// bring in theming
 #include <Carbon/Carbon.h>
 #endif
 
@@ -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;
 }