Fix drawable:set_bgimage()
When called with the file name of an image, this function failed to turn that file name into a cairo surface. Fixes: https://github.com/awesomeWM/awesome/issues/954 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
3e85ddb11d
commit
d4454aba15
|
@ -237,6 +237,9 @@ end
|
||||||
-- as arguments. Any other arguments passed to this method will be appended.
|
-- as arguments. Any other arguments passed to this method will be appended.
|
||||||
-- @param image A background image or a function
|
-- @param image A background image or a function
|
||||||
function drawable:set_bgimage(image, ...)
|
function drawable:set_bgimage(image, ...)
|
||||||
|
if type(image) ~= "function" then
|
||||||
|
image = surface(image)
|
||||||
|
end
|
||||||
|
|
||||||
self.background_image = image
|
self.background_image = image
|
||||||
self.background_image_args = {...}
|
self.background_image_args = {...}
|
||||||
|
|
Loading…
Reference in New Issue