sc ide: ensure dock widgets within screen bounds when first undocked

Fixes #730.