X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/130d96dcf64bcade6fb6b9da49ee9983ed9872ef..4b04699b670b4ab4632229fa0264d154acd3bec1:/src/unix/utilsx11.cpp diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index 778447cea1..073a4eb0d4 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -28,11 +28,13 @@ void wxSetIconsX11( WXDisplay* display, WXWindow window, const wxIconBundle& ib ) { +#if !wxUSE_NANOX size_t size = 0; size_t i, max = ib.m_icons.GetCount(); for( i = 0; i < max; ++i ) - size += 2 + ib.m_icons[i].GetWidth() * ib.m_icons[i].GetHeight(); + if( ib.m_icons[i].Ok() ) + size += 2 + ib.m_icons[i].GetWidth() * ib.m_icons[i].GetHeight(); Atom net_wm_icon = XInternAtom( (Display*)display, "_NET_WM_ICON", 0 ); @@ -57,6 +59,12 @@ void wxSetIconsX11( WXDisplay* display, WXWindow window, gMask = image.GetMaskGreen(); bMask = image.GetMaskBlue(); } + else // no mask, but still init the variables to avoid warnings + { + rMask = + gMask = + bMask = 0; + } *ptr++ = width; *ptr++ = height; @@ -90,6 +98,7 @@ void wxSetIconsX11( WXDisplay* display, WXWindow window, (Window)window, net_wm_icon ); } +#endif } #endif