[fix] fix checkWindow detection on maximized state