Moving do_draw = FALSE out of this function but not ar->drawrect seems problematic for partial redraws, things can get out of sync then. Not sure yet about the solution but can we avoid doing that somehow?