diff options
| author | progandy <code@progandy> | 2015-12-20 17:37:52 +0100 |
|---|---|---|
| committer | progandy <code@progandy> | 2015-12-20 17:37:52 +0100 |
| commit | 3459903ae92117db292a043813413e1495ef7c11 (patch) | |
| tree | 90387e7d43ffdb1bc6224edd1ab75142d264ec64 /main.c | |
| parent | 56e6895fcd75a77862e1ee4c3e0f69dd41adfa42 (diff) | |
make gdk-pixbuf dependency really optional
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -113,6 +113,7 @@ int main(int argc, char **argv) { registry->input->notify = notify_key; +#ifdef WITH_GDK_PIXBUF GError *err = NULL; GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(argv[1], &err); // TODO: Parse i3lock arguments if (!pixbuf) { @@ -120,6 +121,9 @@ int main(int argc, char **argv) { } cairo_surface_t *image = gdk_cairo_image_surface_create_from_pixbuf(pixbuf); g_object_unref(pixbuf); +#else + cairo_surface_t *image = cairo_image_surface_create_from_png(argv[1]); +#endif //WITH_GDK_PIXBUF if (!image) { sway_abort("Failed to read background image."); } |
