fix(root) copy_to_image_surface parameters

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

View File

@ -105,8 +105,9 @@ local steps = {}
-- Check the whole root window.
table.insert(steps, function()
local img = copy_to_image_surface(root.content(), root.size())
local root_width, root_height = root.size()
local img = copy_to_image_surface(capi.root.content(), root_width,
root_height)
if get_pixel(img, 100, 100) ~= "#00ff00" then return end
if get_pixel(img, 2, 2) ~= "#ff0000" then return end