]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/utilsx11.cpp
Changed wxGTK's notion of SetSize() to never allow setting
[wxWidgets.git] / src / unix / utilsx11.cpp
index 44dcaeebe7051aa450692516613ee6b87b358af1..073a4eb0d4e1a874441fc778be81fa0439d51010 100644 (file)
 #include "wx/image.h"
 #include "wx/icon.h"
 
+#ifdef __VMS
+#pragma message disable nosimpint
+#endif
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
+#ifdef __VMS
+#pragma message enable nosimpint
+#endif
 
 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 );
 
@@ -51,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;
@@ -84,6 +98,7 @@ void wxSetIconsX11( WXDisplay* display, WXWindow window,
                          (Window)window,
                          net_wm_icon );
     }
+#endif
 }
 
 #endif