  We develop a theory for the trajectory of an x ray in the presence of a
crystal deformation. A set of equations of motion for an x-ray wave packet
including the dynamical diffraction is derived, taking into account the Berry
phase as a correction to geometrical optics. The trajectory of the wave packet
has a shift of the center position due to a crystal deformation. Remarkably, in
the vicinity of the Bragg condition, the shift is enhanced by a factor $\omega
/\Delta \omega$ ($\omega$: frequency of an x ray, $\Delta\omega$: gap frequency
induced by the Bragg reflection). Comparison with the conventional dynamical
diffraction theory is also made.
