awesome/lib/wibox
Uli Schlachter 4d2a1d5534 wibox.drawable: Support forced screens
Up to now, a drawable always figured out the screen that it is on by
looking at its position. This causes memleak-like problems with wibars:
A wibar has a screen assigned, but its underlying drawable will end up
referring to another screen. Via this, we were managing to build a long
reference chain of screens and drawable that meant that none of the fake
screens that our test suite added could be garbage collected.

To fix this, add wibox.drawable._force_screen(s). After this function is
called, the normal screen detection based on the position is skipped and
instead the given screen is always used. This breaks the above reference
chain and things become garbage-collectable.

Also, this chains the drawable to the life time of the screen: When the
screen becomes invalid (.valid == false), the drawable will stop
redrawing.

Fixes: https://github.com/awesomeWM/awesome/issues/1237
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-18 10:56:47 +01:00
..
container Remove @release @AWESOME_VERSION@ everywhere (#1157) 2016-10-09 22:36:20 +02:00
layout Remove @release @AWESOME_VERSION@ everywhere (#1157) 2016-10-09 22:36:20 +02:00
widget Make the piechart deterministic (#1258) 2016-12-07 20:20:09 +01:00
drawable.lua wibox.drawable: Support forced screens 2016-12-18 10:56:47 +01:00
hierarchy.lua Remove @release @AWESOME_VERSION@ everywhere (#1157) 2016-10-09 22:36:20 +02:00
init.lua wibox.drawable: Support forced screens 2016-12-18 10:56:47 +01:00