When restoring windows, don't let them lie completely off-screen

Also, fix bad clipping behavior for floating toolbox windows