awesome/lib
Sergey Vlasov 29f1719026 awful.titlebar: Fix GC for titlebar widgets (#2830)
Some titlebar widgets (`awful.titlebar.widget.titlewidget`,
`awful.titlebar.widget.button` and other specific button widgets) could
not be garbage collected until the associated client was unmanaged,
because the signal connection used to update the widget was never
destroyed, and the signal handling function was keeping a reference to
the widget in its environment.  This resulted in high memory usage when
the titlebar widgets were recreated multiple times for the same client
(this does not happen with the default Awesome configuration, but may be
needed for dynamic titlebar reconfiguration in a custom config).

Modify the code to use weak tables instead of direct signal connections
to avoid keeping strong references to widgets.  The widget update
functions still keep strong references to the widget itself (creating a
reference loop, but the Lua GC should handle it correctly) and the
client object, but this should not be a problem.

One publicly visible change is that `awful.titlebar.widget.titlewidget`
now has an `update` function, like the button widgets.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-22 11:12:16 +03:00
..
awful awful.titlebar: Fix GC for titlebar widgets (#2830) 2019-07-22 11:12:16 +03:00
beautiful doc: Fix invalid HTML (#2817) 2019-07-09 17:42:01 -04:00
gears Make shapes more robust w.r.t pre-existing paths (#2806) 2019-07-03 16:56:08 -04:00
menubar doc: Fix all the property, theme and field types. 2019-06-08 18:14:14 -04:00
naughty naughty: Auto-reset the timeout when notifications are modified. 2019-07-11 01:01:38 -04:00
wibox wibox.hierarchy:draw: Clear paths after .draw (#2805) 2019-07-03 16:55:38 -04:00
beautiful.lua Add pointless naughty.lua and beautiful.lua files (#1259) 2016-12-08 23:53:50 +01:00
naughty.lua Add pointless naughty.lua and beautiful.lua files (#1259) 2016-12-08 23:53:50 +01:00