fix(screen.content) use capi.root

This commit is contained in:
Aire-One 2021-10-12 20:58:23 +02:00
parent 96710a595e
commit cf9d4d382e
1 changed files with 3 additions and 2 deletions

View File

@ -213,8 +213,9 @@ end
function screen.object.get_content(s)
local geo = s.geometry
local source = gsurf(root.content())
local target = source:create_similar(cairo.Content.COLOR, geo.width, geo.height)
local source = gsurf(capi.root.content())
local target = source:create_similar(cairo.Content.COLOR, geo.width,
geo.height)
local cr = cairo.Context(target)
cr:set_source_surface(source, -geo.x, -geo.y)
cr:rectangle(0, 0, geo.width, geo.height)