You can also go to windows>single window mode, and it will prevent any future accidental closures of the toolbox and layer docks.
It also looks nicer, though any direct transfer of layers (not just copy/paste but actually dragging the layers between files) becomes a bit of a pain in the ass if you don't know what you're doing.