Store menu template even if window isn't focused

update may be called before the window gains focus to store its
template so it is updated correcltly once the window gains focus.