Save the active view for window commands that need it
In case a window command would like to operate on the active view,
save a reference to it early on so that unexpected things don't happen
if the active view changes.