wibox: Do not overwrite `gears.object` methods.

The next commit will all class level signals. The current design
is used in widgets, but is a bad fit for wiboxes. They should
behave more like client. In v5, setting methods on `wibox` directly
will be deprecated. `wibox.object` is already supported. I don't
think anyone really do that anyway and isn't documented.
This commit is contained in:
Emmanuel Lepage Vallee 2020-01-25 19:18:03 -05:00
parent 8a877bd429
commit 5891783ba9
1 changed files with 2 additions and 1 deletions

View File

@ -310,8 +310,9 @@ local function new(args)
ret._drawable:_inform_visible(w.visible)
end)
--TODO v5 deprecate this and use `wibox.object`.
for k, v in pairs(wibox) do
if type(v) == "function" then
if (not rawget(ret, k)) and type(v) == "function" then
ret[k] = v
end
end