diff -u xwd-1.0.1.orig/multiVis.c xwd-1.0.1/multiVis.c --- xwd-1.0.1.orig/multiVis.c 2004-04-23 21:55:09.000000000 +0200 +++ xwd-1.0.1/multiVis.c 2008-01-31 17:51:16.000000000 +0100 @@ -40,6 +40,7 @@ #include #include #include +#include #include #include "list.h" #include "wsutils.h" @@ -1148,10 +1149,10 @@ * do-while loop makes sure we get the entire list from the X server. */ bytesAfter = 0; - numLongs = sizeof(OverlayVisualPropertyRec) / 4; + numLongs = sizeof(OverlayVisualPropertyRec) / sizeof(long); do { - numLongs += bytesAfter * 4; + numLongs += bytesAfter * sizeof(long); XGetWindowProperty(display, RootWindow(display, screen), overlayVisualsAtom, 0, numLongs, False, overlayVisualsAtom, &actualType, &actualFormat, @@ -1160,7 +1161,7 @@ /* Calculate the number of overlay visuals in the list. */ - *numOverlayVisuals = numLongs / (sizeof(OverlayVisualPropertyRec) / 4); + *numOverlayVisuals = numLongs / (sizeof(OverlayVisualPropertyRec) / sizeof(long)); } else { diff -u xwd-1.0.1.orig/wsutils.h xwd-1.0.1/wsutils.h --- xwd-1.0.1.orig/wsutils.h 2004-04-23 21:55:09.000000000 +0200 +++ xwd-1.0.1/wsutils.h 2008-01-31 17:50:36.000000000 +0100 @@ -51,7 +51,7 @@ VisualID visualID; /* The VisualID of the overlay visual */ int transparentType; /* Can be None, TransparentPixel or * TransparentMask */ - int value; /* Pixel value */ + Pixel value; /* Pixel value */ int layer; /* Overlay planes will always be in * layer 1 */ } OverlayVisualPropertyRec; @@ -67,7 +67,7 @@ XVisualInfo *pOverlayVisualInfo; /* Pointer to the XVisualInfo struct */ int transparentType; /* Can be None, TransparentPixel or * TransparentMask */ - int value; /* Pixel value */ + Pixel value; /* Pixel value */ int layer; /* Overlay planes will always be in * layer 1 */ } OverlayInfo;