utils: Fix an error when remove a screen

This commit is contained in:
Emmanuel Lepage Vallee 2016-09-14 01:38:12 -04:00
parent 6ab1a28b72
commit 336aac11b1
1 changed files with 7 additions and 0 deletions

View File

@ -127,6 +127,13 @@ function module.get_ordered_screens()
return screens,screens_inv
end
capi.screen.connect_signal("added", function()
screens,screens_inv = nil, nil
end)
capi.screen.connect_signal("removed", function()
screens,screens_inv = nil, nil
end)
--- Setup the whole thing and call fct(cr, width, height) then apply the shape
-- fct should not set the source or color
function module.apply_shape_bounding(c_or_w, fct)