}
}
CGContextSetAlpha( cgContext , alpha ) ;
+
+ if ( thisWindow->GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT )
+ {
+ HIRect bounds;
+ HIViewGetBounds( controlRef, &bounds );
+ CGContextClearRect( cgContext, bounds );
+ }
+
+
#endif
if ( thisWindow->MacDoRedraw( updateRgn , cEvent.GetTicks() ) )
result = noErr ;
return ;
#if TARGET_API_MAC_OSX
- if ( !m_macBackgroundBrush.Ok() || m_macBackgroundBrush.GetStyle() == wxTRANSPARENT )
+ if ( !m_macBackgroundBrush.Ok() || m_macBackgroundBrush.GetStyle() == wxTRANSPARENT
+ || GetBackgroundStyle() == wxBG_STYLE_TRANSPARENT )
{
event.Skip() ;
}
void wxWindowMac::Update()
{
#if TARGET_API_MAC_OSX
- MacGetTopLevelWindow()->MacPerformUpdates() ;
+ wxTopLevelWindowMac* top = MacGetTopLevelWindow();
+ if (top)
+ top->MacPerformUpdates() ;
#else
::Draw1Control( m_peer->GetControlRef() ) ;
#endif
void wxWindowMac::OnPaint( wxPaintEvent & event )
{
- if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL )
+ if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL
+ && GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
CallNextEventHandler(
(EventHandlerCallRef)wxTheApp->MacGetCurrentEventHandlerCallRef() ,
(EventRef) wxTheApp->MacGetCurrentEvent() ) ;
bool wxWindowMac::SetTransparent(wxByte alpha)
{
#if wxMAC_USE_CORE_GRAPHICS
+ SetBackgroundStyle(wxBG_STYLE_TRANSPARENT);
+
if ( alpha != m_macAlpha )
{
m_macAlpha = alpha ;