diff options
Diffstat (limited to 'swaylock/main.c')
-rw-r--r-- | swaylock/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/swaylock/main.c b/swaylock/main.c index 82b88731..eccb902e 100644 --- a/swaylock/main.c +++ b/swaylock/main.c | |||
@@ -113,6 +113,7 @@ int main(int argc, char **argv) { | |||
113 | 113 | ||
114 | registry->input->notify = notify_key; | 114 | registry->input->notify = notify_key; |
115 | 115 | ||
116 | #ifdef WITH_GDK_PIXBUF | ||
116 | GError *err = NULL; | 117 | GError *err = NULL; |
117 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(argv[1], &err); // TODO: Parse i3lock arguments | 118 | GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(argv[1], &err); // TODO: Parse i3lock arguments |
118 | if (!pixbuf) { | 119 | if (!pixbuf) { |
@@ -120,6 +121,9 @@ int main(int argc, char **argv) { | |||
120 | } | 121 | } |
121 | cairo_surface_t *image = gdk_cairo_image_surface_create_from_pixbuf(pixbuf); | 122 | cairo_surface_t *image = gdk_cairo_image_surface_create_from_pixbuf(pixbuf); |
122 | g_object_unref(pixbuf); | 123 | g_object_unref(pixbuf); |
124 | #else | ||
125 | cairo_surface_t *image = cairo_image_surface_create_from_png(argv[1]); | ||
126 | #endif //WITH_GDK_PIXBUF | ||
123 | if (!image) { | 127 | if (!image) { |
124 | sway_abort("Failed to read background image."); | 128 | sway_abort("Failed to read background image."); |
125 | } | 129 | } |