Simple mouse state machine and event forwarder for canvases.