Fix widget repaint printed errors

This commit is contained in:
Anton Bulakh 2021-11-22 12:39:16 +02:00
parent e64446082b
commit e963d37cc4
No known key found for this signature in database
GPG Key ID: D666799AFFD8502A
1 changed files with 4 additions and 0 deletions

View File

@ -172,6 +172,10 @@ function hierarchy_update(self, context, widget, width, height, region, matrix_t
-- Are there any children which were removed? Their area needs a redraw.
for _, child in ipairs(old_children) do
local x, y, w, h = matrix.transform_rectangle(child._matrix_to_device, child:get_draw_extents())
x = math.floor(x)
y = math.floor(y)
w = math.ceil(w)
h = math.ceil(h)
region:union_rectangle(cairo.RectangleInt{
x = x, y = y, width = w, height = h
})