]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/utilsx11.cpp
XmNframeChildType is not in Lesstif if it was compiled with Motif 1.2
[wxWidgets.git] / src / unix / utilsx11.cpp
index 778447cea1ca661a325ad8572e41c8e05ffe364f..073a4eb0d4e1a874441fc778be81fa0439d51010 100644 (file)
 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