#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/X.h>
+#include <X11/Intrinsic.h>
#include <stdio.h>
#include "list.h"
#include "wsutils.h"
* 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,
/* Calculate the number of overlay visuals in the list. */
- *numOverlayVisuals = numLongs / (sizeof(OverlayVisualPropertyRec) / 4);
+ *numOverlayVisuals = numLongs / (sizeof(OverlayVisualPropertyRec) / sizeof(long));
}
else
{
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;
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;