fix for non-quartz branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -184,8 +184,11 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
|
|||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#if wxMAC_USE_CORE_GRAPHICS
|
||||||
pImage = (CGImageRef) bmp.CGImageCreate() ;
|
pImage = (CGImageRef) bmp.CGImageCreate() ;
|
||||||
#else
|
#else
|
||||||
wxMask* mask = bmp.GetMask();
|
WXHBITMAP iconport ;
|
||||||
if (!mask)
|
WXHBITMAP maskport ;
|
||||||
|
iconport = bmp.GetHBITMAP( &maskport ) ;
|
||||||
|
|
||||||
|
if (!maskport)
|
||||||
{
|
{
|
||||||
// Make a mask with no transparent pixels
|
// Make a mask with no transparent pixels
|
||||||
wxBitmap mbmp(icon.GetWidth(), icon.GetHeight());
|
wxBitmap mbmp(icon.GetWidth(), icon.GetHeight());
|
||||||
@@ -195,12 +198,10 @@ bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
|
|||||||
dc.Clear();
|
dc.Clear();
|
||||||
dc.SelectObject(wxNullBitmap);
|
dc.SelectObject(wxNullBitmap);
|
||||||
bmp.SetMask( new wxMask(mbmp, *wxWHITE) ) ;
|
bmp.SetMask( new wxMask(mbmp, *wxWHITE) ) ;
|
||||||
|
iconport = bmp.GetHBITMAP( &maskport ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//create the icon from the bitmap and mask bitmap contained within
|
//create the icon from the bitmap and mask bitmap contained within
|
||||||
WXHBITMAP iconport ;
|
|
||||||
WXHBITMAP maskport ;
|
|
||||||
iconport = bmp.GetHBITMAP( &maskport ) ;
|
|
||||||
err = CreateCGImageFromPixMaps(
|
err = CreateCGImageFromPixMaps(
|
||||||
GetGWorldPixMap(MAC_WXHBITMAP(iconport)),
|
GetGWorldPixMap(MAC_WXHBITMAP(iconport)),
|
||||||
GetGWorldPixMap(MAC_WXHBITMAP(maskport)),
|
GetGWorldPixMap(MAC_WXHBITMAP(maskport)),
|
||||||
|
Reference in New Issue
Block a user