moved locking of screen outside of put/get pixel, since the user can batch them together for better efficiency