Add pointer lock support.

Signed-off-by: John McCutchan <john@johnmccutchan.com>