aboutsummaryrefslogtreecommitdiffstats
path: root/common/background-image.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-07-09 16:28:37 -0700
committerLibravatar GitHub <noreply@github.com>2018-07-09 16:28:37 -0700
commit6fd9a2bfd6f7d56dc8ed9fc40d80844cc84df107 (patch)
tree7d89592bcfb1adc10ded38d2f8d09d134ddd34fe /common/background-image.c
parentDocument `focus floating|tiling` (diff)
parentMerge pull request #2234 from emersion/wlr-log-prefix (diff)
downloadsway-6fd9a2bfd6f7d56dc8ed9fc40d80844cc84df107.tar.gz
sway-6fd9a2bfd6f7d56dc8ed9fc40d80844cc84df107.tar.zst
sway-6fd9a2bfd6f7d56dc8ed9fc40d80844cc84df107.zip
Merge branch 'master' into focus-mode-toggle
Diffstat (limited to 'common/background-image.c')
-rw-r--r--common/background-image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/background-image.c b/common/background-image.c
index e5fb4433..f3d2551e 100644
--- a/common/background-image.c
+++ b/common/background-image.c
@@ -18,7 +18,7 @@ enum background_mode parse_background_mode(const char *mode) {
18 } else if (strcmp(mode, "solid_color") == 0) { 18 } else if (strcmp(mode, "solid_color") == 0) {
19 return BACKGROUND_MODE_SOLID_COLOR; 19 return BACKGROUND_MODE_SOLID_COLOR;
20 } 20 }
21 wlr_log(L_ERROR, "Unsupported background mode: %s", mode); 21 wlr_log(WLR_ERROR, "Unsupported background mode: %s", mode);
22 return BACKGROUND_MODE_INVALID; 22 return BACKGROUND_MODE_INVALID;
23} 23}
24 24
@@ -28,7 +28,7 @@ cairo_surface_t *load_background_image(const char *path) {
28 GError *err = NULL; 28 GError *err = NULL;
29 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path, &err); 29 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(path, &err);
30 if (!pixbuf) { 30 if (!pixbuf) {
31 wlr_log(L_ERROR, "Failed to load background image (%s).", 31 wlr_log(WLR_ERROR, "Failed to load background image (%s).",
32 err->message); 32 err->message);
33 return false; 33 return false;
34 } 34 }
@@ -38,11 +38,11 @@ cairo_surface_t *load_background_image(const char *path) {
38 image = cairo_image_surface_create_from_png(path); 38 image = cairo_image_surface_create_from_png(path);
39#endif //HAVE_GDK_PIXBUF 39#endif //HAVE_GDK_PIXBUF
40 if (!image) { 40 if (!image) {
41 wlr_log(L_ERROR, "Failed to read background image."); 41 wlr_log(WLR_ERROR, "Failed to read background image.");
42 return NULL; 42 return NULL;
43 } 43 }
44 if (cairo_surface_status(image) != CAIRO_STATUS_SUCCESS) { 44 if (cairo_surface_status(image) != CAIRO_STATUS_SUCCESS) {
45 wlr_log(L_ERROR, "Failed to read background image: %s." 45 wlr_log(WLR_ERROR, "Failed to read background image: %s."
46#ifndef HAVE_GDK_PIXBUF 46#ifndef HAVE_GDK_PIXBUF
47 "\nSway was compiled without gdk_pixbuf support, so only" 47 "\nSway was compiled without gdk_pixbuf support, so only"
48 "\nPNG images can be loaded. This is the likely cause." 48 "\nPNG images can be loaded. This is the likely cause."