On a Cairo surface, i draw a white background and two red rectangles as placeholders for the scrollbars. This surface fills the window.
If i create the surface with cairo_xcb_surface_create, during the resizing of the window the drawing is ok.
If i create the surface with cairo_image_surface_create_for_data and update the window with xcb_put_image, at some point, during the resizing, when the window is large, the red rectangles’ position isn’t updated anymore, but the white background fills the window readily. After the resizing has finished, the red rectangles are drawn at their right position, anyway.
Any clue as to why the red bars lag? They’re part of the same image after all.