mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-02 22:25:48 +01:00
Fixed a bug in wmsetbg.c
This commit is contained in:
@@ -87,6 +87,7 @@ XGETTEXT = @XGETTEXT@
|
||||
XLFLAGS = @XLFLAGS@
|
||||
XLIBS = @XLIBS@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_LIBRARY_PATH = @X_LIBRARY_PATH@
|
||||
wprefsdir = @wprefsdir@
|
||||
|
||||
AUTOMAKE_OPTIONS = no-dependencies
|
||||
|
||||
@@ -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