drawable: Draw bgimage with operator OVER
The actual bg is drawn either with fake transparency over the wallpaper (this uses operator OVER) or for true transparency with operator SOURCE. The bgimage should be drawn ontop of this without erasing the background and thus needs operator OVER. However, before this commit the bgimage was drawn in the same way as the bg and thus inherited its SOURCE operator if a compositor is running. Fix this by restoring the default operator (OVER) and also e.g. the default source before drawing the bgimage. Fixes: https://github.com/awesomeWM/awesome/issues/954 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
d4454aba15
commit
7f74c7c859
|
@ -123,8 +123,11 @@ local function do_redraw(self)
|
|||
cr:set_source(self.background_color)
|
||||
cr:paint()
|
||||
|
||||
cr:restore()
|
||||
|
||||
-- Paint the background image
|
||||
if self.background_image then
|
||||
cr:save()
|
||||
if type(self.background_image) == "function" then
|
||||
self.background_image(context, cr, width, height, unpack(self.background_image_args))
|
||||
else
|
||||
|
@ -132,10 +135,9 @@ local function do_redraw(self)
|
|||
cr:set_source(pattern)
|
||||
cr:paint()
|
||||
end
|
||||
cr:restore()
|
||||
end
|
||||
|
||||
cr:restore()
|
||||
|
||||
-- Draw the widget
|
||||
if self._widget_hierarchy then
|
||||
cr:set_source(self.foreground_color)
|
||||
|
|
Loading…
Reference in New Issue