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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user