diff options
author | Linus Heckemann <git@sphalerite.org> | 2017-07-03 21:19:54 +0100 |
---|---|---|
committer | Linus Heckemann <git@sphalerite.org> | 2017-07-03 22:02:49 +0100 |
commit | 469f0f51fbed78c29fbef13dd8a0f6659ff24bda (patch) | |
tree | b69f1bcaef6b23c90072f0a981e4636adf0d6b18 | |
parent | 3f3b225213322d7c52546a108dc64096be52c6e6 (diff) | |
download | swaybg-469f0f51fbed78c29fbef13dd8a0f6659ff24bda.tar.gz swaybg-469f0f51fbed78c29fbef13dd8a0f6659ff24bda.tar.bz2 |
swaybg: check that background can be loaded
Diffstat (limited to '')
-rw-r--r-- | main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -97,6 +97,14 @@ int main(int argc, const char **argv) { if (!image) { sway_abort("Failed to read background image."); } + if (cairo_surface_status(image) != CAIRO_STATUS_SUCCESS) { + sway_abort("Failed to read background image: %s." +#ifndef WITH_GDK_PIXBUF + "\nSway was compiled without gdk_pixbuf support, so only" + "\nPNG images can be loaded. This is the likely cause." +#endif //WITH_GDK_PIXBUF + , cairo_status_to_string(cairo_surface_status(image))); + } double width = cairo_image_surface_get_width(image); double height = cairo_image_surface_get_height(image); |