X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=driver%2Fwindows.c;h=e6ca0bf53cae9ae0c6668c596e288e97107834dd;hp=e9891af746c849426db40907da6ea2a8abb03cbb;hb=0d6b320def9180cf907ceaed56b23a972a11b757;hpb=3f438031d610c7e15fd33876a879b97e290e05fb diff --git a/driver/windows.c b/driver/windows.c index e9891af7..e6ca0bf5 100644 --- a/driver/windows.c +++ b/driver/windows.c @@ -30,7 +30,7 @@ #endif /* HAVE_UNAME */ #include -#include /* for CARD32 */ +/* #include / * for CARD32 */ #include #include /* for XSetClassHint() */ #include @@ -39,6 +39,13 @@ #include #include +/* You might think that to store an array of 32-bit quantities onto a + server-side property, you would pass an array of 32-bit data quantities + into XChangeProperty(). You would be wrong. You have to use an array + of longs, even if long is 64 bits (using 32 of each 64.) + */ +typedef long PROP32; + #ifdef HAVE_MIT_SAVER_EXTENSION # include #endif /* HAVE_MIT_SAVER_EXTENSION */ @@ -966,16 +973,16 @@ store_saver_id (saver_screen_info *ssi) void store_saver_status (saver_info *si) { - CARD32 *status; + PROP32 *status; int size = si->nscreens + 2; int i; - status = (CARD32 *) calloc (size, sizeof(CARD32)); + status = (PROP32 *) calloc (size, sizeof(PROP32)); - status[0] = (CARD32) (si->screen_blanked_p + status[0] = (PROP32) (si->screen_blanked_p ? (si->locked_p ? XA_LOCK : XA_BLANK) : 0); - status[1] = (CARD32) si->blank_time; + status[1] = (PROP32) si->blank_time; for (i = 0; i < si->nscreens; i++) {