I thought X drawing operations were are always supposed to be synched to screen refreshes. I guess that might be impractical if they take too long, but even so, you can draw into a pixmap and update the visible window with a copy operation. This should not flicker (though it may have tearing if there is constant motion and I'm wrong a about vsync).