I forgot that I fixed this to not do anything too terrible. Now it is just inefficient and may cause temporary distortion in the buffer. On the lines indicated, you seem to be trying to force a redraw. However, Gtk hasn't allocated the image to the screen yet, and will call your drawing method when it is ready. You shouldn't need to do anything there.