Moved the ctx_update and rotation checking to a background thread.