summaryrefslogtreecommitdiff
path: root/src/wallpaper.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-02-27 18:47:00 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-02-27 18:47:11 +0100
commit0be6d72c5b9e8c51b89d2a48a4cee37175dfb9af (patch)
treea1cae289509bd87b778e33bc2132b4b17bc53af3 /src/wallpaper.c
parentc9059ad473c867e1af1407f90a9d8fc5637d167a (diff)
always use absolute paths in .fehbg
Diffstat (limited to 'src/wallpaper.c')
-rw-r--r--src/wallpaper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallpaper.c b/src/wallpaper.c
index 886beb6..b5945f0 100644
--- a/src/wallpaper.c
+++ b/src/wallpaper.c
@@ -310,6 +310,8 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
if (fil && !use_filelist) {
filbuf[out++] = '\'';
+ fil = feh_absolute_path(fil);
+
for (in = 0; fil[in] && out < 4092; in++) {
if (fil[in] == '\'')
@@ -317,12 +319,13 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
filbuf[out++] = fil[in];
}
filbuf[out++] = '\'';
+ free(fil);
} else {
for (l = filelist; l && out < 4092; l = l->next) {
filbuf[out++] = '\'';
- fil = FEH_FILE(l->data)->filename;
+ fil = feh_absolute_path(FEH_FILE(l->data)->filename);
for (in = 0; fil[in] && out < 4092; in++) {
@@ -332,6 +335,7 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
}
filbuf[out++] = '\'';
filbuf[out++] = ' ';
+ free(fil);
}
}