Generating mouse grid limits