Iris cyst; laser ablation is correct!
This horse has a large centrally located iris cyst based off the lower pupillary margin (deflated in the photo) and a small cyst medially adjacent to it (being treated with laser therapy in the photo—note the pinkish-red beam on the cyst body). Both cysts were treated with a diode laser attached to an indirect ophthalmoscope under heavy sedation.
The head shaking was likely due to the presence of the large cyst. It was not causing pathologic changes into the eye, but it impaired vision, and the behavior could be an attempt to clear up the visual field, which would temporarily move the cyst away; it would also enter or leave the visual field depending on whether the pupil was miotic or mydriatic. Such signs improved after laser deflation of the cysts. The laser energy is absorbed by pigmented cells, causing their destruction, but no lesions on a transparent cornea. Floating cysts, either in the anterior or vitreous chamber, can also cause signs of head shaking in horses and can be treated similarly in most cases.