tracking which view is active for proper view selection restoration