diff --git a/lib/awful/titlebar.lua.in b/lib/awful/titlebar.lua.in index 38d4c5631..3dcd4c92b 100644 --- a/lib/awful/titlebar.lua.in +++ b/lib/awful/titlebar.lua.in @@ -253,8 +253,7 @@ local function button_group(name, attrs, sfn, ...) s.attributes = attrs s.states = {} - for i = 1, #arg do - local state = arg[i] + for i, state in pairs({...}) do s.states[state.idx] = state end