]> git.sur5r.net Git - i3/i3lock/commitdiff
Use cairo_status_to_string for descriptive errors.
authorBas Pape <baspape@gmail.com>
Tue, 30 Jul 2013 18:03:19 +0000 (20:03 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 30 Jul 2013 18:08:21 +0000 (20:08 +0200)
i3lock.c

index 5a87999f6b4b666b4e5dfa8bd4371e4ba97f48ae..e5654d61a326e2e7bbed032c36e23ae9dc75d6d6 100644 (file)
--- a/i3lock.c
+++ b/i3lock.c
@@ -657,8 +657,8 @@ int main(int argc, char *argv[]) {
         img = cairo_image_surface_create_from_png(image_path);
         /* In case loading failed, we just pretend no -i was specified. */
         if (cairo_surface_status(img) != CAIRO_STATUS_SUCCESS) {
-            fprintf(stderr, "Could not load image \"%s\": cairo surface status %d\n",
-                    image_path, cairo_surface_status(img));
+            fprintf(stderr, "Could not load image \"%s\": %s\n",
+                    image_path, cairo_status_to_string(cairo_surface_status(img)));
             img = NULL;
         }
     }