Free ram for widgets with clients previews (#117)
This commit is contained in:
parent
7f17e7bb8b
commit
394c3ceeb7
|
@ -107,7 +107,7 @@ local function draw_widget(
|
|||
end
|
||||
end
|
||||
|
||||
return {
|
||||
return wibox.widget {
|
||||
{
|
||||
{
|
||||
{
|
||||
|
@ -182,8 +182,7 @@ local enable = function(opts)
|
|||
|
||||
tag_preview_box.maximum_width = scale * geo.width + margin * 2
|
||||
tag_preview_box.maximum_height = scale * geo.height + margin * 2
|
||||
tag_preview_box:setup(
|
||||
draw_widget(
|
||||
tag_preview_box.widget = draw_widget(
|
||||
t,
|
||||
tag_preview_image,
|
||||
scale,
|
||||
|
@ -199,7 +198,6 @@ local enable = function(opts)
|
|||
geo,
|
||||
margin
|
||||
)
|
||||
)
|
||||
end)
|
||||
|
||||
awesome.connect_signal("bling::tag_preview::visibility", function(s, v)
|
||||
|
@ -208,6 +206,11 @@ local enable = function(opts)
|
|||
tag_preview_box.y = s.geometry.y + widget_y
|
||||
end
|
||||
|
||||
if v == false then
|
||||
tag_preview_box.widget = nil
|
||||
collectgarbage("collect")
|
||||
end
|
||||
|
||||
tag_preview_box.visible = v
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -153,6 +153,9 @@ local enable = function(opts)
|
|||
widget_width,
|
||||
widget_height
|
||||
)
|
||||
else
|
||||
task_preview_box.widget = nil
|
||||
collectgarbage("collect")
|
||||
end
|
||||
|
||||
if not placement_fn then
|
||||
|
|
|
@ -59,6 +59,8 @@ local window_switcher_hide = function(window_switcher_box)
|
|||
-- Stop and hide window_switcher
|
||||
awful.keygrabber.stop(window_switcher_grabber)
|
||||
window_switcher_box.visible = false
|
||||
window_switcher_box.widget = nil
|
||||
collectgarbage("collect")
|
||||
end
|
||||
|
||||
local function draw_widget(
|
||||
|
|
Loading…
Reference in New Issue