Workspace: Save current state, before switching

I thought there was already a request for this, but surprisingly not.

Related: