Handle background image loading failures: fill with the color instead.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Wed, 26 Nov 2014 23:06:25 +0000 (01:06 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Wed, 26 Nov 2014 23:06:25 +0000 (01:06 +0200)
src/panel.c

index 9a5c0e4..805ed18 100644 (file)
@@ -651,11 +651,11 @@ void _panel_determine_background_pixmap(LXPanel * panel, GtkWidget * widget)
             y = 0;
             g_object_unref(pixbuf);
         }
-        if (p->transparent)
+        else
         {
-            /* Color is set, fill the background */
+            /* Either color is set or image is invalid, fill the background */
             gdk_cairo_set_source_color(cr, &p->gtintcolor);
-            cairo_paint_with_alpha(cr, (double)p->alpha/255);
+            cairo_paint_with_alpha(cr, p->transparent ? (double)p->alpha/255 : 1.0);
         }
         cairo_destroy(cr);
     }