]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/nonownedwnd.cpp
wxRichTextCtrl native caret now flashes, for wxMac/Core Graphics mode
[wxWidgets.git] / src / osx / carbon / nonownedwnd.cpp
index c062fa3122391e59ee36209c1355d43cf29e3c04..cbacef05122a7ec1d0ac9499f3fa416d439da752 100644 (file)
@@ -99,12 +99,18 @@ bool wxNonOwnedWindowCarbonImpl::SetBackgroundColour(const wxColour& col )
     if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDocumentWindowBackground)) )
     {
         SetThemeWindowBackground( (WindowRef) m_macWindow,  kThemeBrushDocumentWindowBackground, false ) ;
-        SetBackgroundStyle(wxBG_STYLE_SYSTEM);
+        m_wxPeer->SetBackgroundStyle(wxBG_STYLE_SYSTEM);
+        // call directly if object is not yet completely constructed
+        if ( m_wxPeer->GetNonOwnedPeer() == NULL )
+            SetBackgroundStyle(wxBG_STYLE_SYSTEM);
     }
     else if ( col == wxColour(wxMacCreateCGColorFromHITheme(kThemeBrushDialogBackgroundActive)) )
     {
         SetThemeWindowBackground( (WindowRef) m_macWindow,  kThemeBrushDialogBackgroundActive, false ) ;
-        SetBackgroundStyle(wxBG_STYLE_SYSTEM);
+        m_wxPeer->SetBackgroundStyle(wxBG_STYLE_SYSTEM);
+        // call directly if object is not yet completely constructed
+        if ( m_wxPeer->GetNonOwnedPeer() == NULL )
+            SetBackgroundStyle(wxBG_STYLE_SYSTEM);
     }
     return true;
 }
@@ -755,8 +761,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
            if (!gGlobalCursor.IsOk())
            {
                 // update cursor when over toolbar and titlebar etc.
-                wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ;
-                toplevelWindow->MacSetupCursor( cursorPoint );
+                wxSTANDARD_CURSOR->MacInstall() ;
            }
         }
     
@@ -1182,7 +1187,7 @@ void wxNonOwnedWindowCarbonImpl::Create(
     const wxPoint& pos,
     const wxSize& size,
     long style, long extraStyle, 
-    const wxString& name )
+    const wxString& WXUNUSED(name) )
 {
 
     OSStatus err = noErr ;