From bb5ee50de9482dde6a42b34a4f2c9b13ee7b8e26 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 17 May 2016 21:00:38 -0400 Subject: [PATCH] layoutbox: Revert 25f4f24791 Apparently, there is such thing as not leaking enough... Also try to clear the widgets from mywibox. This seem to help. Time will tell. Fixes #914, unfixes #808 --- lib/awful/widget/layoutbox.lua | 4 ++-- tests/test-leaks.lua | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/awful/widget/layoutbox.lua b/lib/awful/widget/layoutbox.lua index cd5e04409..cb302067a 100644 --- a/lib/awful/widget/layoutbox.lua +++ b/lib/awful/widget/layoutbox.lua @@ -56,10 +56,10 @@ function layoutbox.new(screen) local w = boxes[screen] if not w then w = imagebox() - w._layoutbox_tooltip = tooltip({ objects = {w}, delay_show = 1 }) + w._layoutbox_tooltip = tooltip {objects = {w}, delay_show = 1} update(w, screen) - boxes[screen] = setmetatable({}, {__index = w, __newindex = w}) + boxes[screen] = w end return w diff --git a/tests/test-leaks.lua b/tests/test-leaks.lua index 247524fce..725ed169f 100644 --- a/tests/test-leaks.lua +++ b/tests/test-leaks.lua @@ -14,6 +14,7 @@ end -- Make the layoutbox in the default config GC'able -- luacheck: globals mywibox mylayoutbox for s in screen do + mywibox[s]:set_widget(wibox.widget.textbox()) mywibox[s].visible = false end mywibox = nil