The session manager allows the user to save sessions and restore them after login. It is capable of saving several different sessions. It also provides an easy way to log out, reboot, shutdown, hibernate or suspend your computer.
git clone http://git.xfce.org/git/xfce/xfce4-session