call display update in the main loop (to allow css animation to work well)