From c3a1e36be1e159b8304bd25dbbdcb09b5efa00ad Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 21 Aug 2008 14:57:31 +0200 Subject: [PATCH] awful: avoid concat of nil Signed-off-by: Julien Danjou --- lib/awful.lua.in | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/awful.lua.in b/lib/awful.lua.in index df2435cf..182f68a1 100644 --- a/lib/awful.lua.in +++ b/lib/awful.lua.in @@ -1450,18 +1450,29 @@ function titlebar.update(c) c.titlebar.fg = titlebar.data[c].fg_focus c.titlebar.bg = titlebar.data[c].bg_focus if close then - close.text = theme.titlebar_close_button_focus or - "" or + if theme.titlebar_close_button_focus then + close.text = theme.titlebar_close_button_focus + elseif theme.titlebar_close_button_img_focus then + close.text = + "" + else + close.text = "" - + end end else c.titlebar.fg = titlebar.data[c].fg c.titlebar.bg = titlebar.data[c].bg if close then - close.text = theme.titlebar_close_button_normal or - "" or + if theme.titlebar_close_button_normal then + close.text = theme.titlebar_close_button_normal + elseif theme.titlebar_close_button_img_normal then + close.text = + "" + else + close.text = "" + end end end end