background container: Actually set the foreground color

Commit ba75da7976 worked around a bug in LGI. However, it did so by
just dropping the code that set the foreground color. Instead, it should
have changed the code so that cr:set_source() is only called if the
background container has a foreground color configured instead of "just
always".

Fixes: https://github.com/awesomeWM/awesome/pull/2609#issuecomment-459580395
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2019-02-01 15:28:29 +01:00
parent 5f2cdabc01
commit 6a463da636
1 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,10 @@ function background:before_draw_children(context, cr, width, height)
end
cr:restore()
end
if self._private.foreground then
cr:set_source(self._private.foreground)
end
end
-- Draw the border