Can't close a "torn off viewport"

Not sure of the terminology here, so help me out. I’ve created a viewport in a new window by Shift+Left Dragging on a viewport corner. Now Blender has decided that this is the main window. I can’t close it without closing my project!!! Do I really have to start over from scratch building my interface if this happens?

Could you share some more information? What operating system are you using? Also, what type of video card do you have on your computer?

Open Blender, File -> open, uncheck Load-UI, load your file. Does this help?