With no arguments, window adjusts the view to include everything that is displayed (possibly including items that are invisible). The adjustment includes clipping plane positions and overall scale. Model transformations (rotations and translations relative to input coordinates) are not changed. If a structure has moved out of view, this is an excellent way of making it visible again.
If given an atom-spec as an argument, window will recalculate the view to enclose atoms that are both specified and displayed (possibly including some that are invisible).