Made window 'snapping' support work reasonably well.