Simplify restoring of the window selection