From a5edff396c97e19082e9b1ecf832d38b39c4634f Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 26 May 2016 15:12:56 -0400 Subject: [PATCH] background: Add the common object documentation --- lib/wibox/container/background.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/wibox/container/background.lua b/lib/wibox/container/background.lua index d16c7c314..6b52e9860 100644 --- a/lib/wibox/container/background.lua +++ b/lib/wibox/container/background.lua @@ -14,6 +14,7 @@ local color = require("gears.color") local surface = require("gears.surface") local beautiful = require("beautiful") local cairo = require("lgi").cairo +local util = require("awful.util") local setmetatable = setmetatable local type = type local unpack = unpack or table.unpack -- luacheck: globals unpack (compatibility with Lua 5.1) @@ -268,11 +269,7 @@ local function new(widget, bg, shape) enable_properties = true, }) - for k, v in pairs(background) do - if type(v) == "function" then - ret[k] = v - end - end + util.table.crush(ret, background, true) ret._private.shape = shape @@ -288,6 +285,8 @@ end --@DOC_widget_COMMON@ +--@DOC_object_COMMON@ + return setmetatable(background, background.mt) -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80