X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utils%2Fvroot.h;h=65097b839e75095a5b91c90fc62dfd2af54374fd;hb=2d04c4f22466851aedb6ed0f2919d148f726b889;hp=ef41073a96aab0b797dbf32bb8c1d47b60e693a7;hpb=bbd0773f2adde4927a6196361d4061e70bf48cd9;p=xscreensaver diff --git a/utils/vroot.h b/utils/vroot.h index ef41073a..65097b83 100644 --- a/utils/vroot.h +++ b/utils/vroot.h @@ -60,6 +60,12 @@ * Jamie Zawinski , 3-Sep-2003 * - if the environment variable "XSCREENSAVER_WINDOW" is set, use that * as the root window instead of searching for __SWM_VROOT. + * + * Jamie Zawinski , 14-Aug-2004 + * - changes to get gcc to stop whining about "type punning". + * + * Jamie Zawinski , 16-Dec-2004 + * - fixed that last fix. */ #ifndef _VROOT_H_ @@ -68,7 +74,7 @@ #if !defined(lint) && !defined(SABER) static const char vroot_rcsid[] = - "#Id: vroot.h,v 1.5 2003/09/04 01:04:38 jwz Exp #" "\n" + "#Id: vroot.h,v 1.8 2004/12/16 05:33:54 jwz Exp #" "\n" "#Id: vroot.h,v 1.4 1991/09/30 19:23:16 stolcke Exp stolcke #"; #endif @@ -116,15 +122,15 @@ VirtualRootWindowOfScreen(screen) Screen *screen; Atom actual_type; int actual_format; unsigned long nitems, bytesafter; - Window *newRoot = (Window *)0; + unsigned char *newRoot = 0; if (XGetWindowProperty(dpy, children[i], __SWM_VROOT, 0, 1, False, XA_WINDOW, &actual_type, &actual_format, &nitems, &bytesafter, - (unsigned char **) &newRoot) == Success + &newRoot) == Success && newRoot) { - root = *newRoot; + root = *((Window *) newRoot); break; } }