lock cursor drawing