MainFrame: fix snapping to desktop edges

Refs #4116