X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..26af4dbd0a733de7df04c50acde5b4747f7fff24:/src/x11/utilsx.cpp?ds=sidebyside diff --git a/src/x11/utilsx.cpp b/src/x11/utilsx.cpp index 2339461346..c01eeb8af8 100644 --- a/src/x11/utilsx.cpp +++ b/src/x11/utilsx.cpp @@ -6,9 +6,12 @@ // Created: 05/04/03 // RCS-ID: $Id$ // Copyright: (c) Mattia Barbon -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #ifdef __VMS #define XShapeQueryExtension XSHAPEQUERYEXTENSION #define XtDisplay XTDISPLAY @@ -17,15 +20,20 @@ #include "wx/x11/privx.h" #ifdef HAVE_XSHAPE -#ifdef __VMS -# include "wx/vms_x_fix.h" -# include -#else -# include -#endif -#include "wx/region.h" -#include "wx/bitmap.h" -#include "wx/dcmemory.h" + + #ifndef WX_PRECOMP + #include "wx/bitmap.h" + #include "wx/region.h" + #endif + + #ifdef __VMS + #include "wx/vms_x_fix.h" + #include + #else + #include + #endif + + #include "wx/dcmemory.h" #endif // ---------------------------------------------------------------------------- @@ -180,7 +188,7 @@ void wxXVisualInfo::Init( Display* dpy, XVisualInfo* vi ) XColor* colors = (XColor*) m_visualColormap; for (int i = 0; i < m_visualColormapSize; i++) - colors[i].pixel = i; + colors[i].pixel = i; XQueryColors( dpy, DefaultColormap(dpy, vi->screen), colors, m_visualColormapSize ); @@ -222,7 +230,7 @@ void wxXVisualInfo::Init( Display* dpy, XVisualInfo* vi ) index |= (g >> (5 - m_visualGreenPrec)) << m_visualGreenShift; index |= (b >> (5 - m_visualBluePrec)) << m_visualBlueShift; } - m_colorCube[ (r*1024) + (g*32) + b ] = index; + m_colorCube[ (r*1024) + (g*32) + b ] = (unsigned char)index; } } }