usrlib.de / CVS

Diff for revision 1.10 of bgset/bgset.c

--- //cvs/lukas/bgset/bgset.c	2016/08/15 12:03:21	1.9
+++ //cvs/lukas/bgset/bgset.c	2016/08/16 02:52:11	1.10
@@ -91,7 +91,7 @@
 int
 draw_image(Display *dpy, int scr, Window win, char *filename, enum bgmode mode,
     int scr_x, int scr_y, int scr_w, int scr_h) {
-	int format = 32;
+	int format;
 	unsigned long nitems, bytes_after;
 	unsigned char *data;
 	Atom pxm_prop, type;
@@ -114,7 +114,7 @@
 	} else {
 		pxm = XCreatePixmap(dpy, win, DisplayWidth(dpy, scr),
 		    DisplayHeight(dpy, scr), DefaultDepth(dpy, scr));
-		XChangeProperty(dpy, win, pxm_prop, XA_PIXMAP, format,
+		XChangeProperty(dpy, win, pxm_prop, XA_PIXMAP, 32,
 		    PropModeReplace, (unsigned char *) &pxm, 1);
 	}