From 2d736bf3b590fa51e21703dd2648d0555c710afe Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 25 Jan 2017 23:10:37 +0100 Subject: [PATCH] wibox.drawable: Draw black if no wallpaper is available (#1437) Fixes: https://github.com/awesomeWM/awesome/issues/1411 Signed-off-by: Uli Schlachter --- lib/wibox/drawable.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/wibox/drawable.lua b/lib/wibox/drawable.lua index 330edc31..09e91136 100644 --- a/lib/wibox/drawable.lua +++ b/lib/wibox/drawable.lua @@ -114,11 +114,13 @@ local function do_redraw(self) if not capi.awesome.composite_manager_running then -- This is pseudo-transparency: We draw the wallpaper in the background local wallpaper = surface.load_silently(capi.root.wallpaper(), false) + cr.operator = cairo.Operator.SOURCE if wallpaper then - cr.operator = cairo.Operator.SOURCE cr:set_source_surface(wallpaper, -x, -y) - cr:paint() + else + cr:set_source_rgb(0, 0, 0) end + cr:paint() cr.operator = cairo.Operator.OVER else -- This is true transparency: We draw a translucent background