Add checking for window activity

Need to link with updateschedule