Commit 5be23a8b authored by Jouke Witteveen's avatar Jouke Witteveen
Browse files

Drop hardcoded dependency on a wallpaper

This sets the default to a solid blue color. A custom wallpaper can be used by
starting weston via
`BACKGROUND=/usr/share/wallpapers/Hanami/contents/images/3872x2592.jpg weston`
parent 5218638e
......@@ -43,8 +43,6 @@
extern char **environ; /* defined by libc */
#define DEFAULT_BACKGROUND "/usr/share/wallpapers/Hanami/contents/images/3872x2592.jpg"
struct element {
GtkWidget *window;
GdkPixbuf *pixbuf;
......@@ -576,13 +574,15 @@ background_create (struct desktop *desktop)
memset (background, 0, sizeof *background);
filename = g_getenv ("BACKGROUND");
if (filename == NULL)
unscaled_background = gdk_pixbuf_new_from_file (filename, NULL);
if (filename)
unscaled_background = gdk_pixbuf_new_from_file (filename, NULL);
unscaled_background = gdk_pixbuf_new_from_xpm_data
((const char*[]){"1 1 1 1", "_ c SteelBlue", "_"});
if (!unscaled_background)
g_message ("Could not load background. "
"Do you have kdewallpapers installed?");
g_message ("Could not load background (%s).",
filename ? filename : "built-in");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment