1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-04 12:54:20 +01:00

Fixed a bug in wmsetbg.c

This commit is contained in:
dan
1999-05-31 19:10:38 +00:00
parent bb1a700aa9
commit 81d1ec430f
5 changed files with 15 additions and 16 deletions

View File

@@ -358,6 +358,15 @@ parseTexture(RContext *rc, char *text)
pixmap = LoadJPEG(rc, tmp, &iwidth, &iheight);
*/
if (!pixmap) {
image = loadImage(rc, tmp);
if (!image) {
goto error;
}
iwidth = image->width;
iheight = image->height;
}
GETSTRORGOTO(val, tmp, 2, error);
if (!XParseColor(dpy, DefaultColormap(dpy, scr), tmp, &color)) {
@@ -374,15 +383,6 @@ parseTexture(RContext *rc, char *text)
RGetClosestXColor(rc, &rcolor, &color);
}
if (!pixmap) {
image = loadImage(rc, tmp);
if (!image) {
goto error;
}
iwidth = image->width;
iheight = image->height;
}
switch (toupper(type[0])) {
case 'T':
texture->width = iwidth;