Fix display misbehaving as a wpsetter.

ImageMagick's display returns 1 if it is to draw on the root window.
Teach awsetbg that this is not an error condition.

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Nikos Ntarmos 2009-04-29 16:20:30 +03:00 committed by Julien Danjou
parent 4400f1234d
commit 5ad3eb8021

View file

@ -510,7 +510,8 @@ fi
$WPSETTER `eval echo $option` "$wallpaper"
if [ $? -ne 0 ]; then
if [ $? -ne 0 -a "$WPSETTER" != "display" ] ||
[ $? -ne 1 -a "$WPSETTER" = "display" ]; then
message "Something went wrong while setting the wallpaper.
Run '$WPSETTER "`eval echo $option` $wallpaper"' from an xterm to find out what."
exit 1