1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 13:28:05 +01:00

fix xthing

This commit is contained in:
id
2000-12-25 01:24:43 +00:00
parent 4c60cd5ba4
commit ad4fd02247

View File

@@ -461,18 +461,14 @@ DoWindowBirth(WWindow *wwin)
#ifdef SILLYNESS #ifdef SILLYNESS
static WMPixmap *data[12]; static WMPixmap *data[12];
static Bool static Bool
loadData(WScreen *scr) loadData(WScreen *scr)
{ {
#ifdef needs_update
FILE *f; FILE *f;
int i; int i;
RImage *image; RImage *image;
Pixmap d[12]; Pixmap d[12];
return False;
f = fopen(PKGDATADIR"/xtree.dat", "r"); f = fopen(PKGDATADIR"/xtree.dat", "r");
if (!f) if (!f)
return False; return False;
@@ -484,13 +480,7 @@ loadData(WScreen *scr)
} }
for (i = 0; i < 12; i++) { for (i = 0; i < 12; i++) {
if (fread(image->data[0], 50*50, 1, f)!=1) { if (fread(image->data, 50*50*3, 1, f)!=1) {
goto error;
}
if (fread(image->data[1], 50*50, 1, f)!=1) {
goto error;
}
if (fread(image->data[2], 50*50, 1, f)!=1) {
goto error; goto error;
} }
if (!RConvertImage(scr->rcontext, image, &(d[i]))) { if (!RConvertImage(scr->rcontext, image, &(d[i]))) {
@@ -516,7 +506,7 @@ error:
while (--i > 0) { while (--i > 0) {
XFreePixmap(dpy, d[i]); XFreePixmap(dpy, d[i]);
} }
#endif
return False; return False;
} }