Don't assert in wxOSX if a shaped window doesn't define a valid shape.
A window with wxFRAME_SHAPED style can still not defined any valid shape actually, in which case wxFRAME_SHAPED should be just ignored. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -1549,20 +1549,23 @@ void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *WXUNUSED(_cmd))
 | 
			
		||||
    wxRegion clearRgn;
 | 
			
		||||
    if ( tlwParent->GetWindowStyle() & wxFRAME_SHAPED )
 | 
			
		||||
    {
 | 
			
		||||
        if ( isTopLevel )
 | 
			
		||||
            clearRgn = updateRgn;
 | 
			
		||||
 | 
			
		||||
        int xoffset = 0, yoffset = 0;
 | 
			
		||||
        wxRegion rgn = tlwParent->GetShape();
 | 
			
		||||
        wxpeer->MacRootWindowToWindow( &xoffset, &yoffset );
 | 
			
		||||
        rgn.Offset( xoffset, yoffset );
 | 
			
		||||
        updateRgn.Intersect(rgn);
 | 
			
		||||
 | 
			
		||||
        if ( isTopLevel )
 | 
			
		||||
        if ( rgn.IsOk() )
 | 
			
		||||
        {
 | 
			
		||||
            // Exclude the window shape from the region to be cleared below.
 | 
			
		||||
            rgn.Xor(wxpeer->GetSize());
 | 
			
		||||
            clearRgn.Intersect(rgn);
 | 
			
		||||
            if ( isTopLevel )
 | 
			
		||||
                clearRgn = updateRgn;
 | 
			
		||||
 | 
			
		||||
            int xoffset = 0, yoffset = 0;
 | 
			
		||||
            wxpeer->MacRootWindowToWindow( &xoffset, &yoffset );
 | 
			
		||||
            rgn.Offset( xoffset, yoffset );
 | 
			
		||||
            updateRgn.Intersect(rgn);
 | 
			
		||||
 | 
			
		||||
            if ( isTopLevel )
 | 
			
		||||
            {
 | 
			
		||||
                // Exclude the window shape from the region to be cleared below.
 | 
			
		||||
                rgn.Xor(wxpeer->GetSize());
 | 
			
		||||
                clearRgn.Intersect(rgn);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user