Fix handling of cairo_surface_t and cairo_t
Fix repaint filtering
Fix resize handling