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:
Uli Schlachter 2016-07-09 10:29:05 +02:00
parent 3e85ddb11d
commit d4454aba15
1 changed files with 3 additions and 0 deletions

View File

@ -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 = {...}