awful.rules: Support titlebars_enabled being a function

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2018-08-22 13:22:51 +02:00
parent 0275d3537d
commit 48d4a31b17
1 changed files with 2 additions and 1 deletions

View File

@ -582,7 +582,8 @@ end
-- @tab[opt] callbacks Callbacks to apply. -- @tab[opt] callbacks Callbacks to apply.
function rules.execute(c, props, callbacks) function rules.execute(c, props, callbacks)
-- This has to be done first, as it will impact geometry related props. -- This has to be done first, as it will impact geometry related props.
if props.titlebars_enabled then if props.titlebars_enabled and (type(props.titlebars_enabled) ~= "function"
or props.titlebars_enabled(c,props)) then
c:emit_signal("request::titlebars", "rules", {properties=props}) c:emit_signal("request::titlebars", "rules", {properties=props})
end end