From d4454aba1523ce3ee6af5b3f7f0ebe500c952c12 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 9 Jul 2016 10:29:05 +0200 Subject: [PATCH] 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 --- lib/wibox/drawable.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/wibox/drawable.lua b/lib/wibox/drawable.lua index 75cce527d..38d554e77 100644 --- a/lib/wibox/drawable.lua +++ b/lib/wibox/drawable.lua @@ -237,6 +237,9 @@ end -- as arguments. Any other arguments passed to this method will be appended. -- @param image A background image or a function function drawable:set_bgimage(image, ...) + if type(image) ~= "function" then + image = surface(image) + end self.background_image = image self.background_image_args = {...}