Towards the optical control of resonantly bonded materials : an ultrafast X-ray study