add a refresh-queued flag to coordinate canvas refresh