From 3d12ba3b65f1926fbcae16b28428bd1f4c9b2280 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 25 Feb 2017 16:42:27 +0100 Subject: [PATCH] Fix wibox.container.scroll's property magic Creating a widget already sets a metatable (at least these days). However, wibox.container.scroll overwrote this metatable with its own metatable. This commit removes this overwrite. Signed-off-by: Uli Schlachter --- lib/wibox/container/scroll.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wibox/container/scroll.lua b/lib/wibox/container/scroll.lua index 1c45b792..95aae370 100644 --- a/lib/wibox/container/scroll.lua +++ b/lib/wibox/container/scroll.lua @@ -8,11 +8,11 @@ local cache = require("gears.cache") local timer = require("gears.timer") local hierarchy = require("wibox.hierarchy") local base = require("wibox.widget.base") +local util = require("awful.util") local lgi = require("lgi") local GLib = lgi.GLib local scroll = {} -local scroll_mt = { __index = scroll } local _need_scroll_redraw -- "Strip" a context so that we can use it for our own drawing @@ -380,7 +380,7 @@ local function get_layout(dir, widget, fps, speed, extra_space, expand, max_size ret._private.timer = GLib.Timer() ret._private.scroll_timer = nil - setmetatable(ret, scroll_mt) + util.table.crush(ret, scroll, true) ret:set_direction(dir) ret:set_widget(widget)