lang: pack all the canvas expression execution to be executed after dispatching input, and before drawing the frame if the frame need to be drawed.